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

Rollup of 11 pull requests #81343

Closed
wants to merge 37 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
39466bc
implement Error for &(impl Error)
KodrAus Aug 5, 2020
573ec31
update stabilization to 1.49.0
KodrAus Oct 31, 2020
bbf5001
bump stabilization to 1.51.0
KodrAus Dec 21, 2020
7378676
Fix sysroot option not being honored across rustc
rcvalle Jan 20, 2021
3e9f27d
Remove unnecessary closure
bugadani Jan 22, 2021
58a90de
No peeking
bugadani Jan 22, 2021
9988821
Move missing_item check inside condition
bugadani Jan 22, 2021
d63b278
Only scan through assoc items once in check_impl_items_against_trait
bugadani Jan 22, 2021
ee639de
Only guess span if absolutely necessary
bugadani Jan 22, 2021
aa4f583
Only query associated_items once
bugadani Jan 22, 2021
f29b329
Fix formatting
bugadani Jan 22, 2021
99a1dea
Do not mark unit variants as used when in path pattern
tmiasko Jan 23, 2021
794880c
Don't provide backend_optimization_level query for extern crates
bjorn3 Jan 23, 2021
d118021
Permit mutable references in all const contexts
oli-obk Jan 3, 2021
b217fab
Rename tests to what their code actually does
oli-obk Jan 16, 2021
3cd0b46
Fix a comment that only made sense in the context of a dataflow based…
oli-obk Jan 16, 2021
00e62fa
Adjust wording of a diagnostic
oli-obk Jan 16, 2021
14f39aa
Do not allow arbitrary mutable references in `static mut`, just keep …
oli-obk Jan 16, 2021
cd09871
Cover more cases in the test suite
oli-obk Jan 23, 2021
819b008
Put dynamic check tests into their own file
oli-obk Jan 23, 2021
1129e86
Cleanup `render_stability_since_raw` to remove code duplication
LeSeulArtichaut Jan 23, 2021
9b1d27d
Add option to control doctest run directory
Swatinem Jan 22, 2021
20a460e
Fix rendering of stabilization version for trait implementors
LeSeulArtichaut Jan 23, 2021
14aa12f
Replace version_check dependency with own version parsing code
est31 Jan 22, 2021
f8416fa
Clean up dominators_given_rpo
bugadani Jan 24, 2021
08c01f8
Fix flaky test
jyn514 Jan 19, 2021
67815d1
Rollup merge of #75180 - KodrAus:feat/error-by-ref, r=m-ou-se
jonas-schievink Jan 24, 2021
9e0a84e
Rollup merge of #78578 - oli-obk:const_mut_refs, r=RalfJung
jonas-schievink Jan 24, 2021
879f3b7
Rollup merge of #80933 - rcvalle:fix-sysroot-option, r=nagisa
jonas-schievink Jan 24, 2021
5836c45
Rollup merge of #81197 - jyn514:flaky-test, r=Mark-Simulacrum
jonas-schievink Jan 24, 2021
7d91b36
Rollup merge of #81259 - est31:cfg_version, r=petrochenkov
jonas-schievink Jan 24, 2021
5f300cd
Rollup merge of #81264 - Swatinem:doctest-run-directory, r=jyn514
jonas-schievink Jan 24, 2021
1a3b6b9
Rollup merge of #81279 - bugadani:iter, r=davidtwco
jonas-schievink Jan 24, 2021
372827a
Rollup merge of #81297 - bjorn3:no_extern_backend_optimization_level_…
jonas-schievink Jan 24, 2021
18c8413
Rollup merge of #81302 - LeSeulArtichaut:80777-trait-render, r=jyn514
jonas-schievink Jan 24, 2021
d963e71
Rollup merge of #81310 - tmiasko:in-pattern, r=petrochenkov
jonas-schievink Jan 24, 2021
58a330d
Rollup merge of #81338 - bugadani:dominator-cleanup, r=davidtwco
jonas-schievink Jan 24, 2021
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
Prev Previous commit
Next Next commit
Adjust wording of a diagnostic
  • Loading branch information
oli-obk committed Jan 23, 2021
commit 00e62fabf101571c337fdce24544e94b0e0fda9c
2 changes: 1 addition & 1 deletion compiler/rustc_mir/src/transform/check_consts/ops.rs
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ impl NonConstOp for MutBorrow {
ccx.tcx.sess,
span,
E0764,
"{}mutable references are not allowed in final value of {}s",
"{}mutable references are not allowed in the final value of {}s",
raw,
ccx.const_kind(),
);
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/check-static-immutable-mut-slices.stderr
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
error[E0764]: mutable references are not allowed in final value of statics
error[E0764]: mutable references are not allowed in the final value of statics
--> $DIR/check-static-immutable-mut-slices.rs:3:37
|
LL | static TEST: &'static mut [isize] = &mut [];
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/consts/const-mut-refs/mut_ref_in_final.stderr
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
error[E0764]: mutable references are not allowed in final value of constants
error[E0764]: mutable references are not allowed in the final value of constants
--> $DIR/mut_ref_in_final.rs:10:21
|
LL | const B: *mut i32 = &mut 4;
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/consts/issue-17718-const-bad-values.stderr
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
error[E0764]: mutable references are not allowed in final value of constants
error[E0764]: mutable references are not allowed in the final value of constants
--> $DIR/issue-17718-const-bad-values.rs:1:34
|
LL | const C1: &'static mut [usize] = &mut [];
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0658]: dereferencing raw pointers in constants is unstable
--> $DIR/projection_qualif.rs:11:18
--> $DIR/write_to_mut_ref_dest.rs:11:18
|
LL | unsafe { *b = 5; }
| ^^^^^^
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0658]: mutable references are not allowed in constants
--> $DIR/projection_qualif.rs:10:27
--> $DIR/write_to_mut_ref_dest.rs:10:27
|
LL | let b: *mut u32 = &mut a;
| ^^^^^^
Expand All @@ -8,7 +8,7 @@ LL | let b: *mut u32 = &mut a;
= help: add `#![feature(const_mut_refs)]` to the crate attributes to enable

error[E0658]: dereferencing raw pointers in constants is unstable
--> $DIR/projection_qualif.rs:11:18
--> $DIR/write_to_mut_ref_dest.rs:11:18
|
LL | unsafe { *b = 5; }
| ^^^^^^
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
error[E0764]: mutable references are not allowed in final value of statics
--> $DIR/read_from_static_mut_ref.rs:4:26
error[E0764]: mutable references are not allowed in the final value of statics
--> $DIR/write_to_static_via_mut_ref.rs:4:26
|
LL | static OH_NO: &mut i32 = &mut 42;
| ^^^^^^^

error[E0594]: cannot assign to `*OH_NO`, as `OH_NO` is an immutable static item
--> $DIR/read_from_static_mut_ref.rs:7:5
--> $DIR/write_to_static_via_mut_ref.rs:7:5
|
LL | *OH_NO = 43;
| ^^^^^^^^^^^ cannot assign
Expand Down
8 changes: 4 additions & 4 deletions src/test/ui/error-codes/E0017.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ note: `const` item defined here
LL | const C: i32 = 2;
| ^^^^^^^^^^^^^^^^^

error[E0764]: mutable references are not allowed in final value of constants
error[E0764]: mutable references are not allowed in the final value of constants
--> $DIR/E0017.rs:5:30
|
LL | const CR: &'static mut i32 = &mut C;
Expand All @@ -28,7 +28,7 @@ LL | static STATIC_REF: &'static mut i32 = &mut X;
= note: see issue #57349 <https://github.com/rust-lang/rust/issues/57349> for more information
= help: add `#![feature(const_mut_refs)]` to the crate attributes to enable

error[E0764]: mutable references are not allowed in final value of statics
error[E0764]: mutable references are not allowed in the final value of statics
--> $DIR/E0017.rs:7:39
|
LL | static STATIC_REF: &'static mut i32 = &mut X;
Expand All @@ -54,13 +54,13 @@ note: `const` item defined here
LL | const C: i32 = 2;
| ^^^^^^^^^^^^^^^^^

error[E0764]: mutable references are not allowed in final value of statics
error[E0764]: mutable references are not allowed in the final value of statics
--> $DIR/E0017.rs:11:38
|
LL | static CONST_REF: &'static mut i32 = &mut C;
| ^^^^^^

error[E0764]: mutable references are not allowed in final value of statics
error[E0764]: mutable references are not allowed in the final value of statics
--> $DIR/E0017.rs:13:52
|
LL | static STATIC_MUT_REF: &'static mut i32 = unsafe { &mut M };
Expand Down
6 changes: 3 additions & 3 deletions src/test/ui/error-codes/E0388.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ note: `const` item defined here
LL | const C: i32 = 2;
| ^^^^^^^^^^^^^^^^^

error[E0764]: mutable references are not allowed in final value of constants
error[E0764]: mutable references are not allowed in the final value of constants
--> $DIR/E0388.rs:4:30
|
LL | const CR: &'static mut i32 = &mut C;
Expand All @@ -28,7 +28,7 @@ LL | static STATIC_REF: &'static mut i32 = &mut X;
= note: see issue #57349 <https://github.com/rust-lang/rust/issues/57349> for more information
= help: add `#![feature(const_mut_refs)]` to the crate attributes to enable

error[E0764]: mutable references are not allowed in final value of statics
error[E0764]: mutable references are not allowed in the final value of statics
--> $DIR/E0388.rs:6:39
|
LL | static STATIC_REF: &'static mut i32 = &mut X;
Expand All @@ -54,7 +54,7 @@ note: `const` item defined here
LL | const C: i32 = 2;
| ^^^^^^^^^^^^^^^^^

error[E0764]: mutable references are not allowed in final value of statics
error[E0764]: mutable references are not allowed in the final value of statics
--> $DIR/E0388.rs:10:38
|
LL | static CONST_REF: &'static mut i32 = &mut C;
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/issues/issue-46604.stderr
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
error[E0764]: mutable references are not allowed in final value of statics
error[E0764]: mutable references are not allowed in the final value of statics
--> $DIR/issue-46604.rs:1:25
|
LL | static buf: &mut [u8] = &mut [1u8,2,3,4,5,7];
Expand Down