Skip to content
Merged
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,3 +1,7 @@
//! Regression test for <https://github.com/rust-lang/rust/issues/42796>.
//! Where clause implying trait assoc type is `Copy`, poisoned cache to
//! believe `String: Copy`, which exposed UB.

pub trait Mirror<Smoke> {
type Image;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0382]: borrow of moved value: `s`
--> $DIR/issue-42796.rs:18:20
--> $DIR/poison-copy-via-projection.rs:22:20
|
LL | let s = "Hello!".to_owned();
| - move occurs because `s` has type `String`, which does not implement the `Copy` trait
Expand Down
28 changes: 28 additions & 0 deletions tests/ui/coherence/coherence-overlap-downstream-fundamental.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
//! Regression test for <https://github.com/rust-lang/rust/issues/43355>.
//! Test trait relationship defined as `Trait1<X> for T where T: Trait2<X>`
//! rejects implementations of `Trait1` with generics over `#[fundamental]`
//! types, as a downstream crate can implement dependent `Trait2` for the same
//! type with the same generics, causing coherence breakage.
//!
//! This used to ICE if downstream crate tried to `impl Trait2<Box<_>> for A`.
//@ dont-require-annotations: NOTE

pub trait Trait1<X> {
type Output;
}

pub trait Trait2<X> {}

pub struct A;

impl<X, T> Trait1<X> for T where T: Trait2<X> {
type Output = ();
}

impl<X> Trait1<Box<X>> for A {
//~^ ERROR conflicting implementations of trait
//~| NOTE downstream crates may implement trait `Trait2<std::boxed::Box<_>>` for type `A`
type Output = i32;
}

fn main() {}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0119]: conflicting implementations of trait `Trait1<Box<_>>` for type `A`
--> $DIR/issue-43355.rs:15:1
--> $DIR/coherence-overlap-downstream-fundamental.rs:22:1
|
LL | impl<X, T> Trait1<X> for T where T: Trait2<X> {
| --------------------------------------------- first implementation here
Expand Down
21 changes: 0 additions & 21 deletions tests/ui/issues/issue-43355.rs

This file was deleted.

Comment thread
Kivooeo marked this conversation as resolved.
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
//! Regression test for <https://github.com/rust-lang/rust/issues/43250>.
//! Test expr metavars aren't allowed in places where pattern is expected,
//! and their use doesn't cause ICE.

fn main() {
let mut y;
const C: u32 = 0;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
error: arbitrary expressions aren't allowed in patterns
--> $DIR/issue-43250.rs:9:8
--> $DIR/expr-metavar-in-let-pattern.rs:13:8
|
LL | m!(y);
| ^
|
= note: the `expr` fragment specifier forces the metavariable's content to be an expression

error: arbitrary expressions aren't allowed in patterns
--> $DIR/issue-43250.rs:11:8
--> $DIR/expr-metavar-in-let-pattern.rs:15:8
|
LL | m!(C);
| ^
Expand Down
Comment thread
Kivooeo marked this conversation as resolved.
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
//! Regression test for <https://github.com/rust-lang/rust/issues/43424>.
//! Test generics in attribute paths are rejected.
#![allow(unused)]

macro_rules! m {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error: unexpected generic arguments in path
--> $DIR/issue-43424.rs:10:10
--> $DIR/attr-path-metavar-generic-args.rs:13:10
|
LL | m!(inline<u8>);
| ^^^^
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
//! Regression test for <https://github.com/rust-lang/rust/issues/42880>.
//! Test type-based paths in variant patterns don't cause ICE.

type Value = String;

fn main() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0599]: no associated function or constant named `String` found for struct `String` in the current scope
--> $DIR/issue-42880.rs:4:22
--> $DIR/type-alias-as-variant-pattern.rs:7:22
|
LL | let f = |&Value::String(_)| ();
| ^^^^^^ associated function or constant not found in `String`
Expand Down

@zedddie zedddie Jul 23, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

just noticed this is the only one which doesn't have //@ needs-subprocess🤔

View changes since the review

Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
//! Regression test for <https://github.com/rust-lang/rust/issues/44216>.
//! Test overflowing `Instant` panics.
//@ run-fail
//@ error-pattern:overflow
//@ needs-subprocess

use std::time::{Duration, Instant};

Expand Down
Comment thread
zedddie marked this conversation as resolved.
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//! Regression test for <https://github.com/rust-lang/rust/issues/44216>.
//! Test overflowing `Instant` panics.
//@ run-fail
//@ error-pattern:overflow
//@ needs-subprocess
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//! Regression test for <https://github.com/rust-lang/rust/issues/44216>.
//! Test overflowing `SystemTime` panics.
//@ run-fail
//@ error-pattern:overflow
//@ needs-subprocess
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//! Regression test for <https://github.com/rust-lang/rust/issues/44216>.
//! Test overflowing `SystemTime` panics.
//@ run-fail
//@ error-pattern:overflow
//@ needs-subprocess
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//! Regression test for <https://github.com/rust-lang/rust/issues/43853>.
//! Test using `From::from(f())` on a diverging `f()` doesn't ICE.
//@ run-pass
//@ needs-unwind

Expand Down
Loading