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
2 changes: 0 additions & 2 deletions src/tools/tidy/src/issues.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2324,8 +2324,6 @@ ui/resolve/issue-2356.rs
ui/resolve/issue-23716.rs
ui/resolve/issue-24968.rs
ui/resolve/issue-26545.rs
ui/resolve/issue-3021-c.rs
ui/resolve/issue-3021.rs
ui/resolve/issue-30535.rs
ui/resolve/issue-3099-a.rs
ui/resolve/issue-3099-b.rs
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
//! Regression test for <https://github.com/rust-lang/rust/issues/29861>.
//! Unconstrained lifetimes in associated type were wrongly allowed when
//! occurred in projection.

pub trait MakeRef<'a> {
type Ref;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
error[E0207]: the lifetime parameter `'a` is not constrained by the impl trait, self type, or predicates
--> $DIR/issue-29861.rs:11:6
--> $DIR/unconstrained-lifetime-in-projection.rs:15:6
|
LL | impl<'a, T: 'a> MakeRef2 for T {
| ^^ unconstrained lifetime parameter

error[E0716]: temporary value dropped while borrowed
--> $DIR/issue-29861.rs:16:43
--> $DIR/unconstrained-lifetime-in-projection.rs:20:43
|
LL | fn foo() -> <String as MakeRef2>::Ref2 { &String::from("foo") }
| ^^^^^^^^^^^^^^^^^^^ -- borrow later used here
Expand Down
10 changes: 10 additions & 0 deletions tests/ui/borrowck/index-self-with-arithmetic-on-self-item.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
//! Regression test for <https://github.com/rust-lang/rust/issues/29743>.
//! Test borrowck doesn't complain about using arithmetic with self item
//! as index.
//@ check-pass

fn main() {
let mut i = [1, 2, 3];
i[i[0]] = 0;
i[i[0] - 1] = 0;
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
//! Regression test for <https://github.com/rust-lang/rust/issues/2989>.
//@ run-pass

#![allow(non_camel_case_types)]

trait methods { //~ WARN trait `methods` is never used
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
warning: trait `methods` is never used
--> $DIR/issue-2989.rs:4:7
--> $DIR/bitvec-to-bools-opt-miscompile.rs:6:7
|
LL | trait methods {
| ^^^^^^^
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//! Regression test for <https://github.com/rust-lang/rust/issues/30081>.
//! Misoptimization caused this to segfault.
//@ run-pass
// This used to segfault #30081

pub enum Instruction {
Increment(i8),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
//! Regression test for <https://github.com/rust-lang/rust/issues/29946>.

@zedddie zedddie Jul 3, 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.

this regression test comes from issue 29946, 29948 is a typo :p

View changes since the review

//! Test `FnOnce` impl closure's value gets properly dropped
//! (during unwind as well).
//@ run-pass
//@ needs-unwind
//@ ignore-backends: gcc
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
//@ run-pass
// Regression test for Issue #30018. This is very similar to the
// original reported test, except that the panic is wrapped in a
// spawned thread to isolate the expected error result from the
// SIGTRAP injected by the drop-flag consistency checking.
//! Regression test for <https://github.com/rust-lang/rust/issues/30018>.
//! This is very similar to the original reported test, except that the
//! panic is wrapped in a spawned thread to isolate the expected error
//! result from the SIGTRAP injected by the drop-flag consistency checking.

//@ run-pass
//@ needs-unwind
//@ needs-threads
//@ ignore-backends: gcc
Expand Down
7 changes: 0 additions & 7 deletions tests/ui/issues/issue-29743.rs

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//! Regression test for <https://github.com/rust-lang/rust/issues/29668>.
//! Test functions can return unnameable types.
//@ run-pass
// Functions can return unnameable types

mod m1 {
mod m2 {
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/3021>.
//! Ensure upvars from fn cannot be used in impl method block body.

fn siphash(k0 : u64) {

struct SipHash {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0434]: can't capture dynamic environment in a fn item
--> $DIR/issue-3021-b.rs:9:22
--> $DIR/impl-method-cant-capture-env.rs:12:22
|
LL | self.v0 = k0 ^ 0x736f6d6570736575;
| ^^
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/3021>.
//! Test accessing upvars in impl trait for type method is forbidden.

trait SipHash {
fn reset(&self);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0434]: can't capture dynamic environment in a fn item
--> $DIR/issue-3021.rs:12:22
--> $DIR/impl-trait-for-type-cant-capture-env.rs:15:22
|
LL | self.v0 = k0 ^ 0x736f6d6570736575;
| ^^
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/3021>.
//! Test we can't use outer generic param in trait method defined in fn body.

fn siphash<T>() {

trait U {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0401]: can't use generic parameters from outer item
--> $DIR/issue-3021-c.rs:4:24
--> $DIR/outer-generic-in-trait-method.rs:7:24
|
LL | fn siphash<T>() {
| - type parameter from outer item
Expand All @@ -16,7 +16,7 @@ LL | trait U<T> {
| +++

error[E0401]: can't use generic parameters from outer item
--> $DIR/issue-3021-c.rs:4:30
--> $DIR/outer-generic-in-trait-method.rs:7:30
|
LL | fn siphash<T>() {
| - type parameter from outer item
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/3021>.
//! Ensure upvars from fn cannot be used in impl method block body.

trait SipHash {
fn result(&self) -> u64;
fn reset(&self);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
error[E0434]: can't capture dynamic environment in a fn item
--> $DIR/issue-3021-d.rs:21:23
--> $DIR/trait-impl-cant-capture-env.rs:24:23
|
LL | self.v0 = k0 ^ 0x736f6d6570736575;
| ^^
|
= help: use the `|| { ... }` closure form instead

error[E0434]: can't capture dynamic environment in a fn item
--> $DIR/issue-3021-d.rs:22:23
--> $DIR/trait-impl-cant-capture-env.rs:25:23
|
LL | self.v1 = k1 ^ 0x646f72616e646f6d;
| ^^
Expand Down
Loading