Skip to content

Rustup #2535

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 7, 2022
Merged

Rustup #2535

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion rust-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
dec689432fac6720b2f18101ac28a21add98b1b8
e7c7aa7288559f8e5ea7ce3543ff946b09783628
2 changes: 1 addition & 1 deletion tests/fail/intrinsics/assume.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ fn main() {
unsafe {
std::intrinsics::assume(x < 10);
std::intrinsics::assume(x > 1);
std::intrinsics::assume(x > 42); //~ ERROR: `assume` intrinsic called with `false`
std::intrinsics::assume(x > 42); //~ ERROR: `assume` called with `false`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given that it's StatementKind::Intrinsic, maybe we should make the error talk about intrinsics as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😆 this is a change proposed by you, I had the intrinsic left in the name originally

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Eh, hm... 🙈

}
}
4 changes: 2 additions & 2 deletions tests/fail/intrinsics/assume.stderr
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
error: Undefined Behavior: `assume` intrinsic called with `false`
error: Undefined Behavior: `assume` called with `false`
--> $DIR/assume.rs:LL:CC
|
LL | std::intrinsics::assume(x > 42);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `assume` intrinsic called with `false`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `assume` called with `false`
|
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
Expand Down