Skip to content
Closed
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
70dd3bc
Remove rustc_on_unimplemented's `append_const_msg`
mejrs Mar 31, 2026
8c04367
Refactor `get_standard_error_message`
mejrs Mar 31, 2026
b6bdfed
Avoid needless clone.
mejrs Mar 31, 2026
62db1eb
Improve shadowed private field diagnostics
chenyukang Mar 31, 2026
257d655
extend note for private field to more diagnostics
chenyukang Mar 31, 2026
86f99d2
extend note for private field to method call
chenyukang Mar 31, 2026
ce46df2
Sort shadowed field notes by source order
chenyukang Apr 2, 2026
98d259b
add min_adt_const_params gate tests
zedddie Mar 8, 2026
72fbd1c
implement `min_adt_const_params` feature
zedddie Mar 9, 2026
46b0527
Increase span_look_ahead limit to handle whitespace
fru1tworld Apr 2, 2026
ae899cc
Clarify private field autoderef notes
chenyukang Apr 2, 2026
707c0d0
Add comment to borrow-checker
theemathas Apr 3, 2026
a2f7f3c
ty_utils: lower tuples to `ScalableVector` repr
davidtwco Feb 19, 2026
4fbcb03
cg_llvm: `sve_tuple_{create,get,set}` intrinsics
davidtwco Feb 19, 2026
a24ee03
cg_llvm/debuginfo: scalable vectors
davidtwco Feb 26, 2026
957320c
cg_llvm: `sve_cast` intrinsic
davidtwco Feb 28, 2026
c3d9f99
Remove an unused `StableHash` impl.
nnethercote Apr 3, 2026
d6b2806
feat(core): impl Step for NonZero<u*>
jalil-salame Jul 9, 2024
2bf76b4
Add a regression test for an escaping late-bound region ICE during ca…
jakubadamw Apr 3, 2026
6dd94d6
Add a regression test for an index-out-of-bounds ICE on `partial_cmp`
jakubadamw Apr 3, 2026
fedb021
Add a regression test for an ICE when using `impl Trait` with a const…
jakubadamw Apr 3, 2026
1337370
Remove `BuiltinLintDiag::SingleUseLifetime`
GuillaumeGomez Mar 25, 2026
99f9ba0
Remove `BuiltinLintDiag::AbsPathWithModule`
GuillaumeGomez Mar 25, 2026
6f751ec
Make `DecorateDiagCompat::Dynamic` take an `Any` reference allowing t…
GuillaumeGomez Mar 25, 2026
df848e7
Fix merge conflict
GuillaumeGomez Apr 3, 2026
23acb17
Rollup merge of #154376 - GuillaumeGomez:migrate-diag, r=JonathanBrouwer
jhpratt Apr 4, 2026
dbe801d
Rollup merge of #127534 - jalil-salame:nonzero-uint-step, r=programme…
jhpratt Apr 4, 2026
76be84b
Rollup merge of #153286 - davidtwco:sve-intrinsics, r=Amanieu
jhpratt Apr 4, 2026
bd869a7
Rollup merge of #153592 - zedddie:adt_const_params_restricted_privacy…
jhpratt Apr 4, 2026
7433eb6
Rollup merge of #154675 - chenyukang:yukang-fix-149546-private-field-…
jhpratt Apr 4, 2026
e326d40
Rollup merge of #154703 - fru1tworld:fix-154600-trailing-comma, r=che…
jhpratt Apr 4, 2026
802a201
Rollup merge of #154653 - mejrs:append_const_msg, r=JonathanBrouwer
jhpratt Apr 4, 2026
7009bd9
Rollup merge of #154743 - nnethercote:rm-two-unused-HashStable-impls,…
jhpratt Apr 4, 2026
82c7a39
Rollup merge of #154752 - theemathas:comment, r=lcnr
jhpratt Apr 4, 2026
1d20fc2
Rollup merge of #154764 - jakubadamw:issue-113870-114056-118278, r=ja…
jhpratt Apr 4, 2026
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
//! Regression test for https://github.com/rust-lang/rust/issues/113870

#![feature(generic_const_exprs)]
#![allow(incomplete_features)]

const fn allow<'b, 'b>() -> usize
//~^ ERROR the name `'b` is already used for a generic parameter in this item's generic parameters
where
for<'b> [u8; foo::<'a, 'b>()]: Sized,
//~^ ERROR lifetime name `'b` shadows a lifetime name that is already in scope
//~| ERROR use of undeclared lifetime name `'a`
//~| ERROR cannot capture late-bound lifetime in constant
{
4
}

const fn foo<'a, 'b>() -> usize
where
&'a (): Sized,
&'b (): Sized,
{
4
}
//~^ ERROR `main` function not found in crate
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
error[E0403]: the name `'b` is already used for a generic parameter in this item's generic parameters
--> $DIR/escaping-late-bound-region-in-canonical-ice-113870.rs:6:20
|
LL | const fn allow<'b, 'b>() -> usize
| -- ^^ already used
| |
| first use of `'b`

error[E0496]: lifetime name `'b` shadows a lifetime name that is already in scope
--> $DIR/escaping-late-bound-region-in-canonical-ice-113870.rs:9:9
|
LL | const fn allow<'b, 'b>() -> usize
| -- first declared here
...
LL | for<'b> [u8; foo::<'a, 'b>()]: Sized,
| ^^ lifetime `'b` already in scope

error[E0261]: use of undeclared lifetime name `'a`
--> $DIR/escaping-late-bound-region-in-canonical-ice-113870.rs:9:24
|
LL | for<'b> [u8; foo::<'a, 'b>()]: Sized,
| ^^ undeclared lifetime
|
= note: for more information on higher-ranked polymorphism, visit https://doc.rust-lang.org/nomicon/hrtb.html
help: consider making the bound lifetime-generic with a new `'a` lifetime
|
LL | for<'a, 'b> [u8; foo::<'a, 'b>()]: Sized,
| +++
help: consider introducing lifetime `'a` here
|
LL | const fn allow<'a, 'b, 'b>() -> usize
| +++

error[E0601]: `main` function not found in crate `escaping_late_bound_region_in_canonical_ice_113870`
--> $DIR/escaping-late-bound-region-in-canonical-ice-113870.rs:23:2
|
LL | }
| ^ consider adding a `main` function to `$DIR/escaping-late-bound-region-in-canonical-ice-113870.rs`

error: cannot capture late-bound lifetime in constant
--> $DIR/escaping-late-bound-region-in-canonical-ice-113870.rs:9:28
|
LL | const fn allow<'b, 'b>() -> usize
| -- lifetime defined here
...
LL | for<'b> [u8; foo::<'a, 'b>()]: Sized,
| ^^

error: aborting due to 5 previous errors

Some errors have detailed explanations: E0261, E0403, E0496, E0601.
For more information about an error, try `rustc --explain E0261`.
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
//! Regression test for https://github.com/rust-lang/rust/issues/118278

//@ check-pass

#![allow(incomplete_features)]
#![feature(generic_const_exprs)]

pub trait Foo {
const SIZE: usize;
}

impl Foo for u64 {
const SIZE: usize = 8;
}

pub struct Wrapper<T>
where
T: Foo,
[(); T::SIZE]:,
{
pub t: T,
}

pub fn bar() -> Wrapper<impl Foo> {
Wrapper { t: 10 }
}

fn main() {}
12 changes: 12 additions & 0 deletions tests/ui/typeck/index-out-of-bounds-on-partial-cmp-ice-114056.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
//! Regression test for https://github.com/rust-lang/rust/issues/114056

struct P<Q>(Q);

impl<Q> P<Q> {
fn foo(&self) {
self.partial_cmp(())
//~^ ERROR the method `partial_cmp` exists for reference `&P<Q>`, but its trait bounds were not satisfied
}
}

fn main() {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
error[E0599]: the method `partial_cmp` exists for reference `&P<Q>`, but its trait bounds were not satisfied
--> $DIR/index-out-of-bounds-on-partial-cmp-ice-114056.rs:7:14
|
LL | struct P<Q>(Q);
| ----------- doesn't satisfy `P<Q>: Iterator` or `P<Q>: PartialOrd<_>`
...
LL | self.partial_cmp(())
| ^^^^^^^^^^^ method cannot be called on `&P<Q>` due to unsatisfied trait bounds
|
= note: the following trait bounds were not satisfied:
`P<Q>: PartialOrd<_>`
which is required by `&P<Q>: PartialOrd<&_>`
`&P<Q>: Iterator`
which is required by `&mut &P<Q>: Iterator`
`P<Q>: Iterator`
which is required by `&mut P<Q>: Iterator`
note: the trait `Iterator` must be implemented
--> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
help: consider annotating `P<Q>` with `#[derive(PartialEq, PartialOrd)]`
|
LL + #[derive(PartialEq, PartialOrd)]
LL | struct P<Q>(Q);
|

error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0599`.
Loading