Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
7876836
Remove `rustc_middle::ty::util::ExplicitSelf`.
nnethercote Mar 28, 2025
a91e97c
Fix 2024 edition doctest panic output
GuillaumeGomez Apr 3, 2025
fff2484
Add regression test for #137970
GuillaumeGomez Apr 3, 2025
f9927ee
Use `eprint!` instead of `eprintln!`
GuillaumeGomez Apr 3, 2025
897f9e5
unstable book: document tait
mejrs Apr 3, 2025
b98760b
Fix links
mejrs Apr 3, 2025
a2618e1
AsyncDestructor: replace fields with impl_did
meithecatte Apr 4, 2025
fadf910
Fix `Debug` impl for `LateParamRegionKind`.
nnethercote Apr 4, 2025
0f12a2c
ToSocketAddrs: fix typo
RalfJung Apr 4, 2025
a69a219
Use the span of the whole bound when the diagnostic talks about a bound
oli-obk Apr 1, 2025
76e1302
Use target-agnostic LLD flags in bootstrap for use-lld
Kobzol Apr 4, 2025
00f0ce2
triagebot: add `compiletest` adhoc_group for `r? compiletest`
jieyouxu Apr 4, 2025
00f608a
Rollup merge of #139041 - nnethercote:rm-rustc_middle-ty-util-Explici…
matthiaskrgr Apr 4, 2025
cfc2297
Rollup merge of #139328 - GuillaumeGomez:fix-panic-output-137970, r=f…
matthiaskrgr Apr 4, 2025
8b86782
Rollup merge of #139339 - mejrs:tait, r=oli-obk
matthiaskrgr Apr 4, 2025
d61a473
Rollup merge of #139348 - meithecatte:async-destructor-minify, r=petr…
matthiaskrgr Apr 4, 2025
e3c73c7
Rollup merge of #139353 - nnethercote:LateAnon, r=compiler-errors
matthiaskrgr Apr 4, 2025
fa7d66e
Rollup merge of #139366 - RalfJung:ToSocketAddrs, r=jieyouxu
matthiaskrgr Apr 4, 2025
f074bbf
Rollup merge of #139374 - oli-obk:const-trait-bound, r=compiler-errors
matthiaskrgr Apr 4, 2025
bad6b7b
Rollup merge of #139378 - Kobzol:bootstrap-use-lld-fix, r=petrochenkov
matthiaskrgr Apr 4, 2025
a612ee7
Rollup merge of #139384 - jieyouxu:compiletest-reviewers, r=Kobzol
matthiaskrgr Apr 4, 2025
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
4 changes: 2 additions & 2 deletions compiler/rustc_hir_analysis/src/hir_ty_lowering/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -838,7 +838,7 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ {
| PredicateFilter::SelfOnly
| PredicateFilter::SelfAndAssociatedTypeBounds => {
match constness {
hir::BoundConstness::Always(span) => {
hir::BoundConstness::Always(_) => {
if polarity == ty::PredicatePolarity::Positive {
bounds.push((
poly_trait_ref
Expand All @@ -864,7 +864,7 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ {
// in `lower_assoc_item_constraint`.
PredicateFilter::ConstIfConst | PredicateFilter::SelfConstIfConst => {
match constness {
hir::BoundConstness::Maybe(span) => {
hir::BoundConstness::Maybe(_) => {
if polarity == ty::PredicatePolarity::Positive {
bounds.push((
poly_trait_ref
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/consts/const-block-const-bound.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ note: required by a bound in `f`
--> $DIR/const-block-const-bound.rs:6:15
|
LL | const fn f<T: ~const Destruct>(x: T) {}
| ^^^^^^ required by this bound in `f`
| ^^^^^^^^^^^^^^^ required by this bound in `f`

error: aborting due to 1 previous error

Expand Down
2 changes: 1 addition & 1 deletion tests/ui/traits/const-traits/assoc-type.current.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ note: required by a bound in `Foo::Bar`
--> $DIR/assoc-type.rs:33:15
|
LL | type Bar: ~const Add;
| ^^^^^^ required by this bound in `Foo::Bar`
| ^^^^^^^^^^ required by this bound in `Foo::Bar`

error: aborting due to 1 previous error

Expand Down
2 changes: 1 addition & 1 deletion tests/ui/traits/const-traits/assoc-type.next.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ note: required by a bound in `Foo::Bar`
--> $DIR/assoc-type.rs:33:15
|
LL | type Bar: ~const Add;
| ^^^^^^ required by this bound in `Foo::Bar`
| ^^^^^^^^^^ required by this bound in `Foo::Bar`

error: aborting due to 1 previous error

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ note: required by a bound in `equals_self`
--> $DIR/call-generic-method-nonconst.rs:17:25
|
LL | const fn equals_self<T: ~const Foo>(t: &T) -> bool {
| ^^^^^^ required by this bound in `equals_self`
| ^^^^^^^^^^ required by this bound in `equals_self`

error: aborting due to 1 previous error

Expand Down
4 changes: 2 additions & 2 deletions tests/ui/traits/const-traits/const-drop-fail-2.precise.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ note: required for `ConstDropImplWithBounds<NonTrivialDrop>` to implement `const
--> $DIR/const-drop-fail-2.rs:25:25
|
LL | impl<T: ~const A> const Drop for ConstDropImplWithBounds<T> {
| ------ ^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^
| -------- ^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^
| |
| unsatisfied trait bound introduced here
note: required by a bound in `check`
--> $DIR/const-drop-fail-2.rs:21:19
|
LL | const fn check<T: ~const Destruct>(_: T) {}
| ^^^^^^ required by this bound in `check`
| ^^^^^^^^^^^^^^^ required by this bound in `check`

error: aborting due to 1 previous error

Expand Down
4 changes: 2 additions & 2 deletions tests/ui/traits/const-traits/const-drop-fail-2.stock.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ note: required for `ConstDropImplWithBounds<NonTrivialDrop>` to implement `const
--> $DIR/const-drop-fail-2.rs:25:25
|
LL | impl<T: ~const A> const Drop for ConstDropImplWithBounds<T> {
| ------ ^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^
| -------- ^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^
| |
| unsatisfied trait bound introduced here
note: required by a bound in `check`
--> $DIR/const-drop-fail-2.rs:21:19
|
LL | const fn check<T: ~const Destruct>(_: T) {}
| ^^^^^^ required by this bound in `check`
| ^^^^^^^^^^^^^^^ required by this bound in `check`

error: aborting due to 1 previous error

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ note: required by a bound in `check`
--> $DIR/const-drop-fail.rs:24:19
|
LL | const fn check<T: ~const Destruct>(_: T) {}
| ^^^^^^ required by this bound in `check`
| ^^^^^^^^^^^^^^^ required by this bound in `check`

error[E0277]: the trait bound `NonTrivialDrop: const Destruct` is not satisfied
--> $DIR/const-drop-fail.rs:35:5
Expand All @@ -26,7 +26,7 @@ note: required by a bound in `check`
--> $DIR/const-drop-fail.rs:24:19
|
LL | const fn check<T: ~const Destruct>(_: T) {}
| ^^^^^^ required by this bound in `check`
| ^^^^^^^^^^^^^^^ required by this bound in `check`

error: aborting due to 2 previous errors

Expand Down
4 changes: 2 additions & 2 deletions tests/ui/traits/const-traits/const-drop-fail.new_stock.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ note: required by a bound in `check`
--> $DIR/const-drop-fail.rs:24:19
|
LL | const fn check<T: ~const Destruct>(_: T) {}
| ^^^^^^ required by this bound in `check`
| ^^^^^^^^^^^^^^^ required by this bound in `check`

error[E0277]: the trait bound `NonTrivialDrop: const Destruct` is not satisfied
--> $DIR/const-drop-fail.rs:35:5
Expand All @@ -26,7 +26,7 @@ note: required by a bound in `check`
--> $DIR/const-drop-fail.rs:24:19
|
LL | const fn check<T: ~const Destruct>(_: T) {}
| ^^^^^^ required by this bound in `check`
| ^^^^^^^^^^^^^^^ required by this bound in `check`

error: aborting due to 2 previous errors

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ note: required by a bound in `check`
--> $DIR/const-drop-fail.rs:24:19
|
LL | const fn check<T: ~const Destruct>(_: T) {}
| ^^^^^^ required by this bound in `check`
| ^^^^^^^^^^^^^^^ required by this bound in `check`

error[E0277]: the trait bound `NonTrivialDrop: const Destruct` is not satisfied
--> $DIR/const-drop-fail.rs:35:5
Expand All @@ -26,7 +26,7 @@ note: required by a bound in `check`
--> $DIR/const-drop-fail.rs:24:19
|
LL | const fn check<T: ~const Destruct>(_: T) {}
| ^^^^^^ required by this bound in `check`
| ^^^^^^^^^^^^^^^ required by this bound in `check`

error: aborting due to 2 previous errors

Expand Down
4 changes: 2 additions & 2 deletions tests/ui/traits/const-traits/const-drop-fail.old_stock.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ note: required by a bound in `check`
--> $DIR/const-drop-fail.rs:24:19
|
LL | const fn check<T: ~const Destruct>(_: T) {}
| ^^^^^^ required by this bound in `check`
| ^^^^^^^^^^^^^^^ required by this bound in `check`

error[E0277]: the trait bound `NonTrivialDrop: const Destruct` is not satisfied
--> $DIR/const-drop-fail.rs:35:5
Expand All @@ -26,7 +26,7 @@ note: required by a bound in `check`
--> $DIR/const-drop-fail.rs:24:19
|
LL | const fn check<T: ~const Destruct>(_: T) {}
| ^^^^^^ required by this bound in `check`
| ^^^^^^^^^^^^^^^ required by this bound in `check`

error: aborting due to 2 previous errors

Expand Down
2 changes: 1 addition & 1 deletion tests/ui/traits/const-traits/const-opaque.no.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ note: required by a bound in `bar`
--> $DIR/const-opaque.rs:26:17
|
LL | const fn bar<T: ~const Foo>(t: T) -> impl ~const Foo {
| ^^^^^^ required by this bound in `bar`
| ^^^^^^^^^^ required by this bound in `bar`

error[E0277]: the trait bound `(): const Foo` is not satisfied
--> $DIR/const-opaque.rs:33:12
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ note: required by a bound in `foo`
--> $DIR/default-method-body-is-const-body-checking.rs:7:28
|
LL | const fn foo<T>() where T: ~const Tr {}
| ^^^^^^ required by this bound in `foo`
| ^^^^^^^^^ required by this bound in `foo`

error: aborting due to 1 previous error

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ note: required by a bound in `Foo::Assoc`
--> $DIR/item-bound-entailment-fails.rs:5:20
|
LL | type Assoc<T>: ~const Bar
| ^^^^^^ required by this bound in `Foo::Assoc`
| ^^^^^^^^^^ required by this bound in `Foo::Assoc`

error[E0277]: the trait bound `T: ~const Bar` is not satisfied
--> $DIR/item-bound-entailment-fails.rs:24:21
Expand All @@ -20,12 +20,12 @@ note: required for `C<T>` to implement `~const Bar`
--> $DIR/item-bound-entailment-fails.rs:14:15
|
LL | impl<T> const Bar for C<T> where T: ~const Bar {}
| ^^^ ^^^^ ------ unsatisfied trait bound introduced here
| ^^^ ^^^^ ---------- unsatisfied trait bound introduced here
note: required by a bound in `Foo::Assoc`
--> $DIR/item-bound-entailment-fails.rs:5:20
|
LL | type Assoc<T>: ~const Bar
| ^^^^^^ required by this bound in `Foo::Assoc`
| ^^^^^^^^^^ required by this bound in `Foo::Assoc`

error: aborting due to 2 previous errors

Expand Down
2 changes: 1 addition & 1 deletion tests/ui/traits/const-traits/minicore-fn-fail.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ note: required by a bound in `call_indirect`
--> $DIR/minicore-fn-fail.rs:11:27
|
LL | const fn call_indirect<T: ~const Fn()>(t: &T) { t() }
| ^^^^^^ required by this bound in `call_indirect`
| ^^^^^^^^^^^ required by this bound in `call_indirect`

error: aborting due to 1 previous error

Expand Down
12 changes: 6 additions & 6 deletions tests/ui/traits/const-traits/predicate-entailment-fails.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ LL | type Bar<T> where T: ~const Bar;
| ----------- definition of `Bar` from trait
...
LL | type Bar<T> = () where T: const Bar;
| ^^^^^ impl has extra requirement `T: const Bar`
| ^^^^^^^^^ impl has extra requirement `T: const Bar`

error[E0276]: impl has stricter requirements than trait
--> $DIR/predicate-entailment-fails.rs:17:26
Expand All @@ -14,7 +14,7 @@ LL | fn foo<T>() where T: ~const Bar;
| -------------------------------- definition of `foo` from trait
...
LL | fn foo<T>() where T: const Bar {}
| ^^^^^ impl has extra requirement `T: const Bar`
| ^^^^^^^^^ impl has extra requirement `T: const Bar`

error[E0276]: impl has stricter requirements than trait
--> $DIR/predicate-entailment-fails.rs:28:31
Expand All @@ -23,7 +23,7 @@ LL | type Bar<T> where T: Bar;
| ----------- definition of `Bar` from trait
...
LL | type Bar<T> = () where T: const Bar;
| ^^^^^ impl has extra requirement `T: const Bar`
| ^^^^^^^^^ impl has extra requirement `T: const Bar`

error[E0276]: impl has stricter requirements than trait
--> $DIR/predicate-entailment-fails.rs:31:26
Expand All @@ -32,7 +32,7 @@ LL | fn foo<T>() where T: Bar;
| ------------------------- definition of `foo` from trait
...
LL | fn foo<T>() where T: const Bar {}
| ^^^^^ impl has extra requirement `T: const Bar`
| ^^^^^^^^^ impl has extra requirement `T: const Bar`

error[E0276]: impl has stricter requirements than trait
--> $DIR/predicate-entailment-fails.rs:35:31
Expand All @@ -41,7 +41,7 @@ LL | type Bar<T> where T: Bar;
| ----------- definition of `Bar` from trait
...
LL | type Bar<T> = () where T: ~const Bar;
| ^^^^^^ impl has extra requirement `T: ~const Bar`
| ^^^^^^^^^^ impl has extra requirement `T: ~const Bar`

error[E0276]: impl has stricter requirements than trait
--> $DIR/predicate-entailment-fails.rs:38:26
Expand All @@ -50,7 +50,7 @@ LL | fn foo<T>() where T: Bar;
| ------------------------- definition of `foo` from trait
...
LL | fn foo<T>() where T: ~const Bar {}
| ^^^^^^ impl has extra requirement `T: ~const Bar`
| ^^^^^^^^^^ impl has extra requirement `T: ~const Bar`

error: aborting due to 6 previous errors

Expand Down
4 changes: 2 additions & 2 deletions tests/ui/traits/const-traits/trait-where-clause-const.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ note: required by a bound in `Foo::b`
--> $DIR/trait-where-clause-const.rs:15:24
|
LL | fn b() where Self: ~const Bar;
| ^^^^^^ required by this bound in `Foo::b`
| ^^^^^^^^^^ required by this bound in `Foo::b`

error[E0277]: the trait bound `T: ~const Bar` is not satisfied
--> $DIR/trait-where-clause-const.rs:23:12
Expand All @@ -20,7 +20,7 @@ note: required by a bound in `Foo::c`
--> $DIR/trait-where-clause-const.rs:16:13
|
LL | fn c<T: ~const Bar>();
| ^^^^^^ required by this bound in `Foo::c`
| ^^^^^^^^^^ required by this bound in `Foo::c`

error: aborting due to 2 previous errors

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ note: required by a bound in `require`
--> $DIR/unsatisfied-const-trait-bound.rs:8:15
|
LL | fn require<T: const Trait>() {}
| ^^^^^ required by this bound in `require`
| ^^^^^^^^^^^ required by this bound in `require`

error: aborting due to 4 previous errors

Expand Down