Skip to content

tests/ui/issues/: The Issues Strike Back [1/N] #144151

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
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
28 changes: 0 additions & 28 deletions src/tools/tidy/src/issues.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1439,36 +1439,8 @@ ui/issues/auxiliary/issue-9155.rs
ui/issues/auxiliary/issue-9188.rs
ui/issues/auxiliary/issue-9906.rs
ui/issues/auxiliary/issue-9968.rs
ui/issues/issue-10228.rs
ui/issues/issue-10291.rs
ui/issues/issue-102964.rs
ui/issues/issue-10396.rs
ui/issues/issue-10412.rs
ui/issues/issue-10436.rs
ui/issues/issue-10456.rs
ui/issues/issue-10465.rs
ui/issues/issue-10545.rs
ui/issues/issue-10638.rs
ui/issues/issue-10656.rs
ui/issues/issue-106755.rs
ui/issues/issue-10683.rs
ui/issues/issue-10718.rs
ui/issues/issue-10734.rs
ui/issues/issue-10764.rs
ui/issues/issue-10767.rs
ui/issues/issue-10802.rs
ui/issues/issue-10806.rs
ui/issues/issue-10853.rs
ui/issues/issue-10877.rs
ui/issues/issue-10902.rs
ui/issues/issue-11004.rs
ui/issues/issue-11047.rs
ui/issues/issue-11085.rs
ui/issues/issue-11192.rs
ui/issues/issue-11205.rs
ui/issues/issue-11224.rs
ui/issues/issue-11267.rs
ui/issues/issue-11374.rs
ui/issues/issue-11382.rs
ui/issues/issue-11384.rs
ui/issues/issue-11508.rs
Expand Down
2 changes: 1 addition & 1 deletion src/tools/tidy/src/ui_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ use ignore::Walk;
const ENTRY_LIMIT: u32 = 901;
// FIXME: The following limits should be reduced eventually.

const ISSUES_ENTRY_LIMIT: u32 = 1616;
const ISSUES_ENTRY_LIMIT: u32 = 1577;

const EXPECTED_TEST_FILE_EXTENSIONS: &[&str] = &[
"rs", // test source files
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/10396

//@ check-pass
#![allow(dead_code)]
#[derive(Debug)]
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/11205
//@ run-pass

#![allow(dead_code)]
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/11192
struct Foo {
x: isize
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0502]: cannot borrow `*ptr` as immutable because it is also borrowed as mutable
--> $DIR/issue-11192.rs:20:10
--> $DIR/closure-borrow-conflict.rs:22:10
|
LL | let mut test = |foo: &Foo| {
| ----------- mutable borrow occurs here
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/11085
//@ run-pass

#![allow(dead_code)]
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/10718
//@ run-pass

fn f<F:FnOnce()>(p: F) {
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/10734
//@ run-pass
#![allow(non_upper_case_globals)]

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/10802
//@ run-pass
#![allow(dead_code)]

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/10764
fn f(_: extern "Rust" fn()) {}
extern "C" fn bar() {}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0308]: mismatched types
--> $DIR/issue-10764.rs:4:15
--> $DIR/extern-rust-fn-type-error.rs:6:15
|
LL | fn main() { f(bar) }
| - ^^^ expected "Rust" fn, found "C" fn
Expand All @@ -9,7 +9,7 @@ LL | fn main() { f(bar) }
= note: expected fn pointer `fn()`
found fn item `extern "C" fn() {bar}`
note: function defined here
--> $DIR/issue-10764.rs:1:4
--> $DIR/extern-rust-fn-type-error.rs:3:4
|
LL | fn f(_: extern "Rust" fn()) {}
| ^ ---------------------
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/10877

struct Foo {
x: isize,
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
error[E0130]: patterns aren't allowed in foreign function declarations
--> $DIR/issue-10877.rs:5:12
--> $DIR/foreign-fn-pattern-error.rs:7:12
|
LL | fn foo(1: ());
| ^ pattern not allowed in foreign function

error[E0130]: patterns aren't allowed in foreign function declarations
--> $DIR/issue-10877.rs:7:12
--> $DIR/foreign-fn-pattern-error.rs:9:12
|
LL | fn bar((): isize);
| ^^ pattern not allowed in foreign function

error[E0130]: patterns aren't allowed in foreign function declarations
--> $DIR/issue-10877.rs:9:12
--> $DIR/foreign-fn-pattern-error.rs:11:12
|
LL | fn baz(Foo { x }: isize);
| ^^^^^^^^^ pattern not allowed in foreign function

error[E0130]: patterns aren't allowed in foreign function declarations
--> $DIR/issue-10877.rs:11:12
--> $DIR/foreign-fn-pattern-error.rs:13:12
|
LL | fn qux((x, y): ());
| ^^^^^^ pattern not allowed in foreign function
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/10767
//@ run-pass

pub fn main() {
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/10436
//@ run-pass
fn works<T>(x: T) -> Vec<T> { vec![x] }

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/10806

//@ edition: 2015
//@ run-pass
#![allow(unused_imports)]
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/10291
fn test<'x>(x: &'x isize) {
drop::<Box<dyn for<'z> FnMut(&'z isize) -> &'z isize>>(Box::new(|z| {
x
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-10291.rs:3:9
--> $DIR/closure-lifetime-bounds-error.rs:5:9
|
LL | fn test<'x>(x: &'x isize) {
| -- lifetime `'x` defined here
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/11374

use std::io::{self, Read};
use std::vec;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0308]: mismatched types
--> $DIR/issue-11374.rs:27:15
--> $DIR/container-lifetime-error.rs:29:15
|
LL | c.read_to(v);
| ------- ^ expected `&mut [u8]`, found `Vec<_>`
Expand All @@ -9,7 +9,7 @@ LL | c.read_to(v);
= note: expected mutable reference `&mut [u8]`
found struct `Vec<_>`
note: method defined here
--> $DIR/issue-11374.rs:13:12
--> $DIR/container-lifetime-error.rs:15:12
|
LL | pub fn read_to(&mut self, vec: &mut [u8]) {
| ^^^^^^^ --------------
Expand All @@ -19,7 +19,7 @@ LL | c.read_to(&mut v);
| ++++

error[E0515]: cannot return value referencing local variable `r`
--> $DIR/issue-11374.rs:20:5
--> $DIR/container-lifetime-error.rs:22:5
|
LL | Container::wrap(&mut r as &mut dyn io::Read)
| ^^^^^^^^^^^^^^^^------^^^^^^^^^^^^^^^^^^^^^^
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/10228

//@ run-pass
#![allow(dead_code)]
#![allow(unused_variables)]
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/10412
trait Serializable<'self, T> {
//~^ ERROR lifetimes cannot use keyword names
fn serialize(val: &'self T) -> Vec<u8>; //~ ERROR lifetimes cannot use keyword names
Expand Down
Original file line number Diff line number Diff line change
@@ -1,47 +1,47 @@
error: lifetimes cannot use keyword names
--> $DIR/issue-10412.rs:1:20
--> $DIR/keyword-self-lifetime-error.rs:3:20
|
LL | trait Serializable<'self, T> {
| ^^^^^

error: lifetimes cannot use keyword names
--> $DIR/issue-10412.rs:3:24
--> $DIR/keyword-self-lifetime-error.rs:5:24
|
LL | fn serialize(val: &'self T) -> Vec<u8>;
| ^^^^^

error: lifetimes cannot use keyword names
--> $DIR/issue-10412.rs:4:37
--> $DIR/keyword-self-lifetime-error.rs:6:37
|
LL | fn deserialize(repr: &[u8]) -> &'self T;
| ^^^^^

error: lifetimes cannot use keyword names
--> $DIR/issue-10412.rs:7:6
--> $DIR/keyword-self-lifetime-error.rs:9:6
|
LL | impl<'self> Serializable<str> for &'self str {
| ^^^^^

error: lifetimes cannot use keyword names
--> $DIR/issue-10412.rs:7:36
--> $DIR/keyword-self-lifetime-error.rs:9:36
|
LL | impl<'self> Serializable<str> for &'self str {
| ^^^^^

error: lifetimes cannot use keyword names
--> $DIR/issue-10412.rs:11:24
--> $DIR/keyword-self-lifetime-error.rs:13:24
|
LL | fn serialize(val: &'self str) -> Vec<u8> {
| ^^^^^

error: lifetimes cannot use keyword names
--> $DIR/issue-10412.rs:15:37
--> $DIR/keyword-self-lifetime-error.rs:17:37
|
LL | fn deserialize(repr: &[u8]) -> &'self str {
| ^^^^^

error[E0726]: implicit elided lifetime not allowed here
--> $DIR/issue-10412.rs:7:13
--> $DIR/keyword-self-lifetime-error.rs:9:13
|
LL | impl<'self> Serializable<str> for &'self str {
| ^^^^^^^^^^^^^^^^^ expected lifetime parameter
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/10902
//@ check-pass
#![allow(dead_code)]

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/10853
//@ check-pass

#![deny(missing_docs)]
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/10638
//@ run-pass

pub fn main() {
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/10683

//@ run-pass

static NAME: &'static str = "hello world";
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/10545

mod a {
struct S;
impl S { }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
error[E0603]: struct `S` is private
--> $DIR/issue-10545.rs:6:14
--> $DIR/private-struct-access-error.rs:8:14
|
LL | fn foo(_: a::S) {
| ^ private struct
|
note: the struct `S` is defined here
--> $DIR/issue-10545.rs:2:5
--> $DIR/private-struct-access-error.rs:4:5
|
LL | struct S;
| ^^^^^^^^^
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/11267
//@ run-pass
// Tests that unary structs can be mutably borrowed.

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/10456
//@ check-pass

pub struct Foo;
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/10465
pub mod a {
pub trait A {
fn foo(&self);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0599]: no method named `foo` found for reference `&B` in the current scope
--> $DIR/issue-10465.rs:17:15
--> $DIR/missing-trait-method-error.rs:19:15
|
LL | b.foo();
| ^^^ method not found in `&B`
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/106755
//@ compile-flags:-Ztranslate-lang=en_US

#![feature(negative_impls)]
Expand Down
Loading
Loading