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 9 pull requests #119604

Closed
wants to merge 30 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
5f56465
Make feature `negative_bounds` internal
fmease Dec 27, 2023
a251974
Deny parenthetical notation for negative bounds
fmease Dec 27, 2023
32cea61
Don't elaborate `!Sized` to `!Sized + Sized`
fmease Dec 27, 2023
977546d
rustc_middle: Pretty-print negative bounds correctly
fmease Dec 27, 2023
76d616d
Handle ForeignItem as TAIT scope.
cjgillot Dec 29, 2023
9faa4b5
Disallow reference to `static mut` for expressions
obeis Dec 22, 2023
11129a8
Disallow reference to `static mut` for statements
obeis Dec 22, 2023
5e01c26
Call `maybe_expr_static_mut` inside `resolve_expr`
obeis Dec 22, 2023
a4a774a
Call `maybe_stmt_static_mut` inside `resolve_stmt`
obeis Dec 22, 2023
cd07eb1
Add test for `E0796` and `static_mut_ref` lint
obeis Dec 22, 2023
7fd2d8d
Do not run check on foreign items.
cjgillot Dec 31, 2023
03e9eff
Use `resolutions(()).effective_visiblities` to avoid cycle errors
compiler-errors Jan 4, 2024
af32054
Remove `-Zdump-mir-spanview`
Zalathar Jan 4, 2024
ddc5a82
Update test for `E0796` and `static_mut_ref` lint
obeis Dec 22, 2023
cf9484e
Remove `-Zreport-delayed-bugs`.
nnethercote Jan 4, 2024
35ad2ae
Fix invalid handling for static method calls in jump to definition fe…
GuillaumeGomez Jan 4, 2024
5bc7687
Add regression test for jump to def static method calls
GuillaumeGomez Jan 4, 2024
073ed0e
Move `i586-unknown-netbsd` from tier 2 to tier 3 platform support table
Nemo157 Jan 4, 2024
12b92c8
Visit only reachable blocks in MIR lint
tmiasko Dec 30, 2023
a084e06
Fix validation and linting of injected MIR
tmiasko Jan 1, 2024
df116ec
Migrate memory overlap check from validator to lint
tmiasko Jan 4, 2024
3010173
Rollup merge of #117556 - obeis:static-mut-ref-lint, r=davidtwco
matthiaskrgr Jan 5, 2024
eef7457
Rollup merge of #119354 - fmease:negative_bounds-fixes, r=compiler-er…
matthiaskrgr Jan 5, 2024
3f5d62b
Rollup merge of #119420 - cjgillot:issue-119295, r=compiler-errors
matthiaskrgr Jan 5, 2024
5ab7d7d
Rollup merge of #119506 - compiler-errors:visibilities-for-object-saf…
matthiaskrgr Jan 5, 2024
23b3822
Rollup merge of #119566 - Zalathar:remove-spanview, r=Swatinem,Nilstrieb
matthiaskrgr Jan 5, 2024
c29fa7e
Rollup merge of #119567 - nnethercote:rm-Zreport-delayed-bugs, r=oli-obk
matthiaskrgr Jan 5, 2024
894cc61
Rollup merge of #119577 - tmiasko:lint, r=oli-obk
matthiaskrgr Jan 5, 2024
28c794b
Rollup merge of #119586 - GuillaumeGomez:jump-to-def-static-methods, …
matthiaskrgr Jan 5, 2024
cd5f42f
Rollup merge of #119588 - Nemo157:i586-netbsd-tier-3, r=Nilstrieb
matthiaskrgr Jan 5, 2024
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
Next Next commit
Make feature negative_bounds internal
  • Loading branch information
fmease committed Dec 27, 2023
commit 5f5646562185e5eb3e3b4a5d45d4bd37585a0040
2 changes: 1 addition & 1 deletion compiler/rustc_feature/src/unstable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ declare_features! (
/// Allows the `multiple_supertrait_upcastable` lint.
(unstable, multiple_supertrait_upcastable, "1.69.0", None),
/// Allow negative trait bounds. This is an internal-only feature for testing the trait solver!
(incomplete, negative_bounds, "1.71.0", None),
(internal, negative_bounds, "1.71.0", None),
/// Allows using `#[omit_gdb_pretty_printer_section]`.
(internal, omit_gdb_pretty_printer_section, "1.5.0", None),
/// Allows using `#[prelude_import]` on glob `use` items.
Expand Down
1 change: 0 additions & 1 deletion tests/ui/traits/negative-bounds/associated-constraints.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#![feature(negative_bounds, associated_type_bounds)]
//~^ WARN the feature `negative_bounds` is incomplete and may not be safe to use and/or cause compiler crashes

trait Trait {
type Assoc;
Expand Down
19 changes: 5 additions & 14 deletions tests/ui/traits/negative-bounds/associated-constraints.stderr
Original file line number Diff line number Diff line change
@@ -1,34 +1,25 @@
error: associated type constraints not allowed on negative bounds
--> $DIR/associated-constraints.rs:8:19
--> $DIR/associated-constraints.rs:7:19
|
LL | fn test<T: !Trait<Assoc = i32>>() {}
| ^^^^^^^^^^^

error: associated type constraints not allowed on negative bounds
--> $DIR/associated-constraints.rs:11:31
--> $DIR/associated-constraints.rs:10:31
|
LL | fn test2<T>() where T: !Trait<Assoc = i32> {}
| ^^^^^^^^^^^

error: associated type constraints not allowed on negative bounds
--> $DIR/associated-constraints.rs:14:20
--> $DIR/associated-constraints.rs:13:20
|
LL | fn test3<T: !Trait<Assoc: Send>>() {}
| ^^^^^^^^^^^

error: associated type constraints not allowed on negative bounds
--> $DIR/associated-constraints.rs:17:31
--> $DIR/associated-constraints.rs:16:31
|
LL | fn test4<T>() where T: !Trait<Assoc: Send> {}
| ^^^^^^^^^^^

warning: the feature `negative_bounds` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/associated-constraints.rs:1:12
|
LL | #![feature(negative_bounds, associated_type_bounds)]
| ^^^^^^^^^^^^^^^
|
= note: `#[warn(incomplete_features)]` on by default

error: aborting due to 4 previous errors; 1 warning emitted

error: aborting due to 4 previous errors
1 change: 0 additions & 1 deletion tests/ui/traits/negative-bounds/simple.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#![feature(negative_bounds, negative_impls)]
//~^ WARN the feature `negative_bounds` is incomplete and may not be safe to use and/or cause compiler crashes

fn not_copy<T: !Copy>() {}

Expand Down
26 changes: 9 additions & 17 deletions tests/ui/traits/negative-bounds/simple.stderr
Original file line number Diff line number Diff line change
@@ -1,44 +1,36 @@
warning: the feature `negative_bounds` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/simple.rs:1:12
|
LL | #![feature(negative_bounds, negative_impls)]
| ^^^^^^^^^^^^^^^
|
= note: `#[warn(incomplete_features)]` on by default

error[E0277]: the trait bound `T: !Copy` is not satisfied
--> $DIR/simple.rs:11:16
--> $DIR/simple.rs:10:16
|
LL | not_copy::<T>();
| ^ the trait `!Copy` is not implemented for `T`
|
note: required by a bound in `not_copy`
--> $DIR/simple.rs:4:16
--> $DIR/simple.rs:3:16
|
LL | fn not_copy<T: !Copy>() {}
| ^^^^^ required by this bound in `not_copy`

error[E0277]: the trait bound `T: !Copy` is not satisfied
--> $DIR/simple.rs:16:16
--> $DIR/simple.rs:15:16
|
LL | not_copy::<T>();
| ^ the trait `!Copy` is not implemented for `T`
|
note: required by a bound in `not_copy`
--> $DIR/simple.rs:4:16
--> $DIR/simple.rs:3:16
|
LL | fn not_copy<T: !Copy>() {}
| ^^^^^ required by this bound in `not_copy`

error[E0277]: the trait bound `Copyable: !Copy` is not satisfied
--> $DIR/simple.rs:31:16
--> $DIR/simple.rs:30:16
|
LL | not_copy::<Copyable>();
| ^^^^^^^^ the trait `!Copy` is not implemented for `Copyable`
|
= help: the trait `Copy` is implemented for `Copyable`
note: required by a bound in `not_copy`
--> $DIR/simple.rs:4:16
--> $DIR/simple.rs:3:16
|
LL | fn not_copy<T: !Copy>() {}
| ^^^^^ required by this bound in `not_copy`
Expand All @@ -49,13 +41,13 @@ LL | struct Copyable;
|

error[E0277]: the trait bound `NotNecessarilyCopyable: !Copy` is not satisfied
--> $DIR/simple.rs:38:16
--> $DIR/simple.rs:37:16
|
LL | not_copy::<NotNecessarilyCopyable>();
| ^^^^^^^^^^^^^^^^^^^^^^ the trait `!Copy` is not implemented for `NotNecessarilyCopyable`
|
note: required by a bound in `not_copy`
--> $DIR/simple.rs:4:16
--> $DIR/simple.rs:3:16
|
LL | fn not_copy<T: !Copy>() {}
| ^^^^^ required by this bound in `not_copy`
Expand All @@ -65,6 +57,6 @@ LL + #[derive(Copy)]
LL | struct NotNecessarilyCopyable;
|

error: aborting due to 4 previous errors; 1 warning emitted
error: aborting due to 4 previous errors

For more information about this error, try `rustc --explain E0277`.
1 change: 0 additions & 1 deletion tests/ui/traits/negative-bounds/supertrait.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// check-pass

#![feature(negative_bounds)]
//~^ WARN the feature `negative_bounds` is incomplete

trait A: !B {}
trait B: !A {}
Expand Down
10 changes: 0 additions & 10 deletions tests/ui/traits/negative-bounds/supertrait.stderr

This file was deleted.