Skip to content
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

core: move intrinsics.rs into intrinsics folder #132639

Merged
merged 1 commit into from
Nov 8, 2024
Merged
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
File renamed without changes.
4 changes: 2 additions & 2 deletions tests/ui/consts/const-eval/raw-pointer-ub.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ LL | *ptr = 0;
| ^^^^^^^^ accessing memory based on pointer with alignment 1, but alignment 4 is required

error[E0080]: evaluation of constant value failed
--> $SRC_DIR/core/src/intrinsics.rs:LL:COL
--> $SRC_DIR/core/src/intrinsics/mod.rs:LL:COL
|
= note: accessing memory with alignment 1, but alignment 4 is required
|
note: inside `copy_nonoverlapping::<u32>`
--> $SRC_DIR/core/src/intrinsics.rs:LL:COL
--> $SRC_DIR/core/src/intrinsics/mod.rs:LL:COL
note: inside `std::ptr::const_ptr::<impl *const u32>::copy_to_nonoverlapping`
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
note: inside `MISALIGNED_COPY`
Expand Down
8 changes: 4 additions & 4 deletions tests/ui/intrinsics/const-eval-select-bad.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ LL | const_eval_select((), 42, 0xDEADBEEF);
= help: the trait `FnOnce()` is not implemented for `{integer}`
= note: wrap the `{integer}` in a closure with no arguments: `|| { /* code */ }`
note: required by a bound in `const_eval_select`
--> $SRC_DIR/core/src/intrinsics.rs:LL:COL
--> $SRC_DIR/core/src/intrinsics/mod.rs:LL:COL

error[E0277]: expected a `FnOnce()` closure, found `{integer}`
--> $DIR/const-eval-select-bad.rs:10:31
Expand All @@ -40,7 +40,7 @@ LL | const_eval_select((), 42, 0xDEADBEEF);
= help: the trait `FnOnce()` is not implemented for `{integer}`
= note: wrap the `{integer}` in a closure with no arguments: `|| { /* code */ }`
note: required by a bound in `const_eval_select`
--> $SRC_DIR/core/src/intrinsics.rs:LL:COL
--> $SRC_DIR/core/src/intrinsics/mod.rs:LL:COL

error: this argument must be a function item
--> $DIR/const-eval-select-bad.rs:10:27
Expand Down Expand Up @@ -69,7 +69,7 @@ LL | const_eval_select((1,), foo, bar);
| required by a bound introduced by this call
|
note: required by a bound in `const_eval_select`
--> $SRC_DIR/core/src/intrinsics.rs:LL:COL
--> $SRC_DIR/core/src/intrinsics/mod.rs:LL:COL

error[E0631]: type mismatch in function arguments
--> $DIR/const-eval-select-bad.rs:37:32
Expand All @@ -85,7 +85,7 @@ LL | const_eval_select((true,), foo, baz);
= note: expected function signature `fn(bool) -> _`
found function signature `fn(i32) -> _`
note: required by a bound in `const_eval_select`
--> $SRC_DIR/core/src/intrinsics.rs:LL:COL
--> $SRC_DIR/core/src/intrinsics/mod.rs:LL:COL
help: consider wrapping the function in a closure
|
LL | const_eval_select((true,), |arg0: bool| foo(/* i32 */), baz);
Expand Down
Loading