Skip to content

Commit cd96923

Browse files
committed
Fix path in compiletest failure output.
1 parent 0c975e2 commit cd96923

File tree

2 files changed

+12
-11
lines changed

2 files changed

+12
-11
lines changed

tests/ui/lang/control_flow/for_range_signed-broken.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// build-fail
2+
// normalize-stderr-test "\S*/library/core/src/" -> "$$CORE_SRC/"
23

34
// FIXME(eddyb) this should work, but `unchecked_add_unsigned` doesn't exist,
45
// so range internals use `a.checked_add_unsigned(b).unwrap_unchecked()` instead,

tests/ui/lang/control_flow/for_range_signed-broken.stderr

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error: checked add is not supported yet
2-
--> /home/eddy/.rustup/toolchains/nightly-2024-04-24-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/num/mod.rs:335:5
2+
--> $CORE_SRC/num/mod.rs:335:5
33
|
44
335 | / int_impl! {
55
336 | | Self = i32,
@@ -11,7 +11,7 @@ error: checked add is not supported yet
1111
| |_____^
1212
|
1313
note: used from within `<i32>::overflowing_add`
14-
--> /home/eddy/.rustup/toolchains/nightly-2024-04-24-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/num/mod.rs:335:5
14+
--> $CORE_SRC/num/mod.rs:335:5
1515
|
1616
335 | / int_impl! {
1717
336 | | Self = i32,
@@ -22,7 +22,7 @@ note: used from within `<i32>::overflowing_add`
2222
354 | | }
2323
| |_____^
2424
note: called by `<i32>::overflowing_add_unsigned`
25-
--> /home/eddy/.rustup/toolchains/nightly-2024-04-24-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/num/mod.rs:335:5
25+
--> $CORE_SRC/num/mod.rs:335:5
2626
|
2727
335 | / int_impl! {
2828
336 | | Self = i32,
@@ -33,7 +33,7 @@ note: called by `<i32>::overflowing_add_unsigned`
3333
354 | | }
3434
| |_____^
3535
note: called by `<i32>::checked_add_unsigned`
36-
--> /home/eddy/.rustup/toolchains/nightly-2024-04-24-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/num/mod.rs:335:5
36+
--> $CORE_SRC/num/mod.rs:335:5
3737
|
3838
335 | / int_impl! {
3939
336 | | Self = i32,
@@ -44,32 +44,32 @@ note: called by `<i32>::checked_add_unsigned`
4444
354 | | }
4545
| |_____^
4646
note: called by `<i32 as core::iter::range::Step>::forward_unchecked`
47-
--> /home/eddy/.rustup/toolchains/nightly-2024-04-24-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/range.rs:423:1
47+
--> $CORE_SRC/iter/range.rs:423:1
4848
|
4949
423 | / step_integer_impls! {
5050
424 | | narrower than or same width as usize: [u8 i8], [u16 i16], [u32 i32], [usize isize];
5151
425 | | wider than usize: [u64 i64], [u128 i128];
5252
426 | | }
5353
| |_^
5454
note: called by `<core::ops::range::Range<i32> as core::iter::range::RangeIteratorImpl>::spec_next`
55-
--> /home/eddy/.rustup/toolchains/nightly-2024-04-24-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/range.rs:756:35
55+
--> $CORE_SRC/iter/range.rs:756:35
5656
|
5757
756 | self.start = unsafe { Step::forward_unchecked(old, 1) };
5858
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
5959
note: called by `<core::ops::range::Range<i32> as core::iter::traits::iterator::Iterator>::next`
60-
--> /home/eddy/.rustup/toolchains/nightly-2024-04-24-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/range.rs:844:9
60+
--> $CORE_SRC/iter/range.rs:844:9
6161
|
6262
844 | self.spec_next()
6363
| ^^^^^^^^^^^^^^^^
6464
note: called by `for_range_signed_broken::main`
65-
--> $DIR/for_range_signed-broken.rs:11:14
65+
--> $DIR/for_range_signed-broken.rs:12:14
6666
|
67-
11 | for _ in 0..i {}
67+
12 | for _ in 0..i {}
6868
| ^^^^
6969
note: called by `main`
70-
--> $DIR/for_range_signed-broken.rs:10:8
70+
--> $DIR/for_range_signed-broken.rs:11:8
7171
|
72-
10 | pub fn main(#[spirv(flat)] i: i32) {
72+
11 | pub fn main(#[spirv(flat)] i: i32) {
7373
| ^^^^
7474

7575
error: aborting due to 1 previous error

0 commit comments

Comments
 (0)