Skip to content

Commit ec01ff0

Browse files
committed
revert note message wording
1 parent 14ccea4 commit ec01ff0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+64
-68
lines changed

compiler/rustc_const_eval/messages.ftl

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,10 +103,7 @@ const_eval_frame_note = {$times ->
103103
*[other] [... {$times} additional calls {const_eval_frame_note_inner} ...]
104104
}
105105
106-
const_eval_frame_note_inner = {$is_last ->
107-
[true] {"the failure occurred "}
108-
*[false] {""}
109-
}inside {$where_ ->
106+
const_eval_frame_note_inner = inside {$where_ ->
110107
[closure] closure
111108
[instance] `{$instance}`
112109
*[other] {""}

compiler/rustc_const_eval/src/errors.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,6 @@ impl Subdiagnostic for FrameNote {
298298
diag.arg("times", self.times);
299299
diag.arg("where_", self.where_);
300300
diag.arg("instance", self.instance);
301-
diag.arg("is_last", self.is_last);
302301
let mut span: MultiSpan = self.span.into();
303302
if self.is_last && !self.span.is_dummy() {
304303
span.push_span_label(self.span, fluent::const_eval_frame_note_last);

tests/ui/borrowck/issue-81899.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ error[E0080]: evaluation of constant value failed
44
LL | const _CONST: &[u8] = &f(&[], |_| {});
55
| ^^^^^^^^^^^^^^ panic: explicit panic
66
|
7-
note: the failure occurred inside `f::<{closure@$DIR/issue-81899.rs:4:31: 4:34}>`
7+
note: inside `f::<{closure@$DIR/issue-81899.rs:4:31: 4:34}>`
88
--> $DIR/issue-81899.rs:11:5
99
|
1010
LL | panic!()

tests/ui/borrowck/issue-88434-minimal-example.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ error[E0080]: evaluation of constant value failed
44
LL | const _CONST: &() = &f(&|_| {});
55
| ^^^^^^^^^^ panic: explicit panic
66
|
7-
note: the failure occurred inside `f::<{closure@$DIR/issue-88434-minimal-example.rs:3:25: 3:28}>`
7+
note: inside `f::<{closure@$DIR/issue-88434-minimal-example.rs:3:25: 3:28}>`
88
--> $DIR/issue-88434-minimal-example.rs:10:5
99
|
1010
LL | panic!()

tests/ui/borrowck/issue-88434-removal-index-should-be-less.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ error[E0080]: evaluation of constant value failed
44
LL | const _CONST: &[u8] = &f(&[], |_| {});
55
| ^^^^^^^^^^^^^^ panic: explicit panic
66
|
7-
note: the failure occurred inside `f::<{closure@$DIR/issue-88434-removal-index-should-be-less.rs:3:31: 3:34}>`
7+
note: inside `f::<{closure@$DIR/issue-88434-removal-index-should-be-less.rs:3:31: 3:34}>`
88
--> $DIR/issue-88434-removal-index-should-be-less.rs:10:5
99
|
1010
LL | panic!()

tests/ui/coherence/const-errs-dont-conflict-103369.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ error[E0080]: evaluation of constant value failed
44
LL | impl ConstGenericTrait<{my_fn(1)}> for () {}
55
| ^^^^^^^^ panic: Some error occurred
66
|
7-
note: the failure occurred inside `my_fn`
7+
note: inside `my_fn`
88
--> $DIR/const-errs-dont-conflict-103369.rs:10:5
99
|
1010
LL | panic!("Some error occurred");
@@ -17,7 +17,7 @@ error[E0080]: evaluation of constant value failed
1717
LL | impl ConstGenericTrait<{my_fn(2)}> for () {}
1818
| ^^^^^^^^ panic: Some error occurred
1919
|
20-
note: the failure occurred inside `my_fn`
20+
note: inside `my_fn`
2121
--> $DIR/const-errs-dont-conflict-103369.rs:10:5
2222
|
2323
LL | panic!("Some error occurred");

tests/ui/const-generics/issues/issue-100313.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ error[E0080]: evaluation of constant value failed
44
LL | x.set_false();
55
| ^^^^^^^^^^^^^ writing to ALLOC0 which is read-only
66
|
7-
note: the failure occurred inside `T::<&true>::set_false`
7+
note: inside `T::<&true>::set_false`
88
--> $DIR/issue-100313.rs:9:13
99
|
1010
LL | *(B as *const bool as *mut bool) = false;

tests/ui/const-ptr/forbidden_slices.stderr

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ LL | pub static R1: &[()] = unsafe { from_ptr_range(ptr::null()..ptr::null()) };
107107
|
108108
note: inside `from_ptr_range::<'_, ()>`
109109
--> $SRC_DIR/core/src/slice/raw.rs:LL:COL
110-
note: the failure occurred inside `std::ptr::const_ptr::<impl *const ()>::sub_ptr`
110+
note: inside `std::ptr::const_ptr::<impl *const ()>::sub_ptr`
111111
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
112112
|
113113
= note: the failure occurred here
@@ -119,7 +119,7 @@ error[E0080]: could not evaluate static initializer
119119
LL | from_ptr_range(ptr..ptr.add(2)) // errors inside libcore
120120
| ^^^^^^^^^^ out-of-bounds pointer arithmetic: expected a pointer to 8 bytes of memory, but got ALLOC10 which is only 4 bytes from the end of the allocation
121121
|
122-
note: the failure occurred inside `std::ptr::const_ptr::<impl *const u32>::add`
122+
note: inside `std::ptr::const_ptr::<impl *const u32>::add`
123123
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
124124
|
125125
= note: the failure occurred here
@@ -176,7 +176,7 @@ error[E0080]: could not evaluate static initializer
176176
LL | from_ptr_range(ptr..ptr.add(1))
177177
| ^^^^^^^^^^ out-of-bounds pointer arithmetic: expected a pointer to 8 bytes of memory, but got ALLOC11+0x1 which is only 7 bytes from the end of the allocation
178178
|
179-
note: the failure occurred inside `std::ptr::const_ptr::<impl *const u64>::add`
179+
note: inside `std::ptr::const_ptr::<impl *const u64>::add`
180180
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
181181
|
182182
= note: the failure occurred here
@@ -189,7 +189,7 @@ LL | pub static R9: &[u32] = unsafe { from_ptr_range(&D0..(&D0 as *const u32).ad
189189
|
190190
note: inside `from_ptr_range::<'_, u32>`
191191
--> $SRC_DIR/core/src/slice/raw.rs:LL:COL
192-
note: the failure occurred inside `std::ptr::const_ptr::<impl *const u32>::sub_ptr`
192+
note: inside `std::ptr::const_ptr::<impl *const u32>::sub_ptr`
193193
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
194194
|
195195
= note: the failure occurred here
@@ -202,7 +202,7 @@ LL | pub static R10: &[u32] = unsafe { from_ptr_range(&D0..&D0) };
202202
|
203203
note: inside `from_ptr_range::<'_, u32>`
204204
--> $SRC_DIR/core/src/slice/raw.rs:LL:COL
205-
note: the failure occurred inside `std::ptr::const_ptr::<impl *const u32>::sub_ptr`
205+
note: inside `std::ptr::const_ptr::<impl *const u32>::sub_ptr`
206206
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
207207
|
208208
= note: the failure occurred here

tests/ui/const-ptr/out_of_bounds_read.stderr

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ error[E0080]: evaluation of constant value failed
44
LL | const _READ: u32 = unsafe { ptr::read(PAST_END_PTR) };
55
| ^^^^^^^^^^^^^^^^^^^^^^^ memory access failed: expected a pointer to 4 bytes of memory, but got ALLOC0+0x4 which is at or beyond the end of the allocation of size 4 bytes
66
|
7-
note: the failure occurred inside `std::ptr::read::<u32>`
7+
note: inside `std::ptr::read::<u32>`
88
--> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
99
|
1010
= note: the failure occurred here
@@ -17,7 +17,7 @@ LL | const _CONST_READ: u32 = unsafe { PAST_END_PTR.read() };
1717
|
1818
note: inside `std::ptr::const_ptr::<impl *const u32>::read`
1919
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
20-
note: the failure occurred inside `std::ptr::read::<u32>`
20+
note: inside `std::ptr::read::<u32>`
2121
--> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
2222
|
2323
= note: the failure occurred here
@@ -30,7 +30,7 @@ LL | const _MUT_READ: u32 = unsafe { (PAST_END_PTR as *mut u32).read() };
3030
|
3131
note: inside `std::ptr::mut_ptr::<impl *mut u32>::read`
3232
--> $SRC_DIR/core/src/ptr/mut_ptr.rs:LL:COL
33-
note: the failure occurred inside `std::ptr::read::<u32>`
33+
note: inside `std::ptr::read::<u32>`
3434
--> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
3535
|
3636
= note: the failure occurred here

tests/ui/consts/const-eval/const_fn_ptr_fail2.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ const X: fn(usize) -> usize = double;
77

88
const fn bar(x: fn(usize) -> usize, y: usize) -> usize {
99
x(y)
10-
//~^ NOTE the failure occurred inside `bar`
10+
//~^ NOTE inside `bar`
1111
//~| NOTE the failure occurred here
12-
//~| NOTE the failure occurred inside `bar`
12+
//~| NOTE inside `bar`
1313
//~| NOTE the failure occurred here
1414
}
1515

0 commit comments

Comments
 (0)