Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
@@ -1,4 +1,4 @@
// Regression test for #60218
// Regression test for https://github.com/rust-lang/rust/issues/60218
//
// This was reported to cause ICEs.

Comment on lines +1 to 4

@zedddie zedddie Jul 15, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// Regression test for https://github.com/rust-lang/rust/issues/60218
//
// This was reported to cause ICEs.
//! Regression test for https://github.com/rust-lang/rust/issues/60218
//! This was reported to cause ICEs.

View changes since the review

Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
error[E0277]: the trait bound `&u32: Foo` is not satisfied
--> $DIR/issue-60218.rs:18:19
--> $DIR/hrtb-with-assoc-type-projection.rs:18:19
|
LL | trigger_error(vec![], |x: &u32| x)
| ------------- ^^^^^^ the trait `Foo` is not implemented for `&u32`
| |
| required by a bound introduced by this call
|
help: this trait has no implementations, consider adding one
--> $DIR/issue-60218.rs:7:1
--> $DIR/hrtb-with-assoc-type-projection.rs:7:1
|
LL | pub trait Foo {}
| ^^^^^^^^^^^^^
note: required by a bound in `trigger_error`
--> $DIR/issue-60218.rs:13:72
--> $DIR/hrtb-with-assoc-type-projection.rs:13:72
|
LL | pub fn trigger_error<I, F>(iterable: I, functor: F)
| ------------- required by a bound in this function
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//! Regression test for https://github.com/rust-lang/rust/issues/49919
fn foo<'a, T: 'a>(t: T) -> Box<dyn Fn() -> &'a T + 'a> {
let foo: Box<dyn for <'c> Fn() -> &'c T> = Box::new(move || &t);
//~^ ERROR: binding for associated type
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0582]: binding for associated type `Output` references lifetime `'c`, which does not appear in the trait input types
--> $DIR/issue-49919.rs:2:39
--> $DIR/unbound-hrtb-lifetime.rs:3:39
|
LL | let foo: Box<dyn for <'c> Fn() -> &'c T> = Box::new(move || &t);
| ^^^^^
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//! Regression test for https://github.com/rust-lang/rust/issues/50187
//@ check-pass

#![feature(decl_macro)]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//@ run-pass
// Regression test for an obscure issue with the projection cache.
// https://github.com/rust-lang/rust/issues/42552
Comment on lines 1 to +3

@zedddie zedddie Jul 15, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
//@ run-pass
// Regression test for an obscure issue with the projection cache.
// https://github.com/rust-lang/rust/issues/42552
//! Regression test for an obscure issue with the projection cache.
//! https://github.com/rust-lang/rust/issues/42552
//@ run-pass

View changes since the review


fn into_iter<I: Iterator>(a: &I) -> Groups<'_, I> {
Groups { _a: a }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//! Regression test for https://github.com/rust-lang/rust/issues/39827
//@ run-pass
#![feature(core_intrinsics)]

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//! Regression test for https://github.com/rust-lang/rust/issues/48006
//@ run-pass

#![feature(step_trait)]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//! Regression test for https://github.com/rust-lang/rust/issues/46311
fn main() {
'break: loop { //~ ERROR labels cannot use keyword names
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error: labels cannot use keyword names
--> $DIR/issue-46311.rs:2:5
--> $DIR/keyword-as-label-name.rs:3:5
|
LL | 'break: loop {
| ^^^^^^
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//! Regression test for https://github.com/rust-lang/rust/issues/43692
//@ run-pass
fn main() {
assert_eq!('\u{10__FFFF}', '\u{10FFFF}');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//! Regression test for https://github.com/rust-lang/rust/issues/52533
fn foo(_: impl for<'a> FnOnce(&'a u32, &u32) -> &'a u32) {
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error: lifetime may not live long enough
--> $DIR/issue-52533.rs:5:16
--> $DIR/closure-must-return-bound-lifetime.rs:6:16
|
LL | foo(|a, b| b)
| - - ^ closure was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//! Regression test for https://github.com/rust-lang/rust/issues/37884
//@ dont-require-annotations: NOTE

struct RepeatMut<'a, T>(T, &'a ());
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0308]: method not compatible with trait
--> $DIR/issue-37884.rs:8:5
--> $DIR/scope-leak-in-lifetime-error.rs:9:5
|
LL | fn next(&'a mut self) -> Option<Self::Item>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ lifetime mismatch
Expand All @@ -9,7 +9,7 @@ LL | fn next(&'a mut self) -> Option<Self::Item>
note: the anonymous lifetime as defined here...
--> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
note: ...does not necessarily outlive the lifetime `'a` as defined here
--> $DIR/issue-37884.rs:5:6
--> $DIR/scope-leak-in-lifetime-error.rs:6:6
|
LL | impl<'a, T: 'a> Iterator for RepeatMut<'a, T> {
| ^^
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//! Regression test for https://github.com/rust-lang/rust/issues/42467
//@ check-pass
#![allow(dead_code)]
struct Foo<T>(T);
Expand Down
26 changes: 26 additions & 0 deletions tests/ui/lub-glb/if-else-arms-use-lub.rs

@zedddie zedddie Jul 15, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this one doesn't seem to be a move (it also overlaps with #159308 which is already merged, so this will likely produce a duplicate).

View changes since the review

Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
//! Regression test for https://github.com/rust-lang/rust/issues/4025
//@ check-pass
#![allow(dead_code)]
#![allow(unused_mut)]
/*
# if b { x } else { y } requires identical types for x and y
*/

fn print1(b: bool, s1: &str, s2: &str) {
println!("{}", if b { s1 } else { s2 });
}
fn print2<'a, 'b>(b: bool, s1: &'a str, s2: &'b str) {
println!("{}", if b { s1 } else { s2 });
}
fn print3(b: bool, s1: &str, s2: &str) {
let mut s: &str;
if b { s = s1; } else { s = s2; }
println!("{}", s);
}
fn print4<'a, 'b>(b: bool, s1: &'a str, s2: &'b str) {
let mut s: &str;
if b { s = s1; } else { s = s2; }
println!("{}", s);
}

pub fn main() {}
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//! Regression test for https://github.com/rust-lang/rust/issues/53251
struct S;

impl S {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0107]: associated function takes 0 generic arguments but 1 generic argument was supplied
--> $DIR/issue-53251.rs:11:20
--> $DIR/repeated-macro-expansion-error.rs:12:20
|
LL | S::f::<i64>();
| ^------- help: remove the unnecessary generics
Expand All @@ -10,14 +10,14 @@ LL | impl_add!(a b);
| -------------- in this macro invocation
|
note: associated function defined here, with 0 generic parameters
--> $DIR/issue-53251.rs:4:8
--> $DIR/repeated-macro-expansion-error.rs:5:8
|
LL | fn f() {}
| ^
= note: this error originates in the macro `impl_add` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0107]: associated function takes 0 generic arguments but 1 generic argument was supplied
--> $DIR/issue-53251.rs:11:20
--> $DIR/repeated-macro-expansion-error.rs:12:20
|
LL | S::f::<i64>();
| ^------- help: remove the unnecessary generics
Expand All @@ -28,7 +28,7 @@ LL | impl_add!(a b);
| -------------- in this macro invocation
|
note: associated function defined here, with 0 generic parameters
--> $DIR/issue-53251.rs:4:8
--> $DIR/repeated-macro-expansion-error.rs:5:8
|
LL | fn f() {}
| ^
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//! Regression test for https://github.com/rust-lang/rust/issues/42148
//@ run-pass
struct Zst;

Expand Down
Loading