Auto merge of #152671 - JonathanBrouwer:rollup-4Ov19Nw, r=JonathanBrouwer
Rollup of 4 pull requests Successful merges: - rust-lang/rust#152566 (Remove code for ThinLTO from cg_gcc) - rust-lang/rust#152278 (Fix const normalization for generic const items with trait assoc consts) - rust-lang/rust#152604 (Relocate some tests) - rust-lang/rust#152625 (Provide all lint group names to Clippy)
This commit is contained in:
commit
873b4beb0c
82 changed files with 108 additions and 467 deletions
|
|
@ -172,10 +172,6 @@ See:
|
|||
- [`std::box::Boxed`](https://doc.rust-lang.org/std/boxed/struct.Box.html)
|
||||
- [Tracking issue for `box_patterns` feature #29641](https://github.com/rust-lang/rust/issues/29641)
|
||||
|
||||
## `tests/ui/btreemap/`: B-Tree Maps
|
||||
|
||||
Tests focused on `BTreeMap` collections and their compiler interactions. E.g. collection patterns, iterator behavior, and trait implementations specific to `BTreeMap`. See [`std::collections::BTreeMap`](https://doc.rust-lang.org/std/collections/struct.BTreeMap.html).
|
||||
|
||||
## `tests/ui/builtin-superkinds/`: Built-in Trait Hierarchy Tests
|
||||
|
||||
Tests for built-in trait hierarchy (Send, Sync, Sized, etc.) and their supertrait relationships. E.g. auto traits and marker trait constraints.
|
||||
|
|
@ -262,12 +258,10 @@ This directory only contains one highly specific test. Other coinduction tests c
|
|||
|
||||
## `tests/ui/collections`
|
||||
|
||||
These tests exercise the `collections` library.
|
||||
These tests exercise the `collections` library. For example, `BTreeMap` and `HashMap`.
|
||||
|
||||
See [`std::collections`](https://doc.rust-lang.org/std/collections/index.html)
|
||||
|
||||
**FIXME**: consider merge with `tests/ui/btreemap` and `tests/ui/hashmap`
|
||||
|
||||
## `tests/ui/command/`: `std::process::Command`
|
||||
|
||||
This directory is actually for the standard library [`std::process::Command`](https://doc.rust-lang.org/std/process/struct.Command.html) type, where some tests are too difficult or inconvenient to write as unit tests or integration tests within the standard library itself.
|
||||
|
|
@ -518,10 +512,6 @@ The `dyn` keyword is used to highlight that calls to methods on the associated T
|
|||
|
||||
See [`dyn` keyword](https://doc.rust-lang.org/std/keyword.dyn.html).
|
||||
|
||||
## `tests/ui/dynamically-sized-types`: Dynamically Sized Types
|
||||
|
||||
**FIXME**: should be coalesced with `tests/ui/dst`.
|
||||
|
||||
## `tests/ui/editions/`: Rust edition-specific peculiarities
|
||||
|
||||
These tests run in specific Rust editions, such as Rust 2015 or Rust 2018, and check errors and functionality related to specific now-deprecated idioms and features.
|
||||
|
|
@ -688,10 +678,6 @@ Tests on range patterns where one of the bounds is not a direct value.
|
|||
|
||||
**FIXME**: Overlaps with `ui/range`. `impossible_range.rs` is particularly suspected to be a duplicate test.
|
||||
|
||||
## `tests/ui/hashmap/`
|
||||
|
||||
Tests for the standard library collection [`std::collections::HashMap`](https://doc.rust-lang.org/std/collections/struct.HashMap.html).
|
||||
|
||||
## `tests/ui/higher-ranked/`
|
||||
|
||||
Tests for higher-ranked trait bounds.
|
||||
|
|
@ -701,10 +687,6 @@ See:
|
|||
- [Higher-ranked trait bounds | rustc-dev-guide](https://rustc-dev-guide.rust-lang.org/traits/hrtb.html)
|
||||
- [Higher-ranked trait bounds | Nomicon](https://doc.rust-lang.org/nomicon/hrtb.html)
|
||||
|
||||
## `tests/ui/higher-ranked-trait-bounds`
|
||||
|
||||
**FIXME**: move to `tests/ui/higher-ranked/trait-bounds`
|
||||
|
||||
## `tests/ui/hygiene/`
|
||||
|
||||
This seems to have been originally intended for "hygienic macros" - macros which work in all contexts, independent of what surrounds them. However, this category has grown into a mish-mash of many tests that may belong in the other directories.
|
||||
|
|
@ -927,12 +909,6 @@ See [Tracking issue for allowing overlapping implementations for marker trait #2
|
|||
|
||||
Broad category of tests on `match` constructs.
|
||||
|
||||
## `tests/ui/meta/`: Tests for compiletest itself
|
||||
|
||||
These tests check the function of the UI test suite at large and Compiletest in itself.
|
||||
|
||||
**FIXME**: This should absolutely be merged with `tests/ui/compiletest-self-test/`.
|
||||
|
||||
## `tests/ui/methods/`
|
||||
|
||||
A broad category for anything related to methods and method resolution.
|
||||
|
|
@ -1530,12 +1506,6 @@ See [RFC 0132 Unified Function Call Syntax](https://github.com/rust-lang/rfcs/bl
|
|||
|
||||
See [Tracking issue for Fn traits (`unboxed_closures` & `fn_traits` feature)](https://github.com/rust-lang/rust/issues/29625).
|
||||
|
||||
## `tests/ui/underscore-imports/`
|
||||
|
||||
See [Underscore imports | Reference](https://doc.rust-lang.org/reference/items/use-declarations.html#underscore-imports).
|
||||
|
||||
**FIXME**: should become a subdirectory of `tests/ui/imports/`.
|
||||
|
||||
## `tests/ui/underscore-lifetime/`: `'_` elided lifetime
|
||||
|
||||
Exercises [anonymous elided lifetimes](https://doc.rust-lang.org/reference/lifetime-elision.html).
|
||||
|
|
|
|||
|
|
@ -1,23 +1,23 @@
|
|||
error[E0161]: cannot move a value of type `str`
|
||||
--> $DIR/dst-index.rs:31:5
|
||||
--> $DIR/dst-index-fail.rs:31:5
|
||||
|
|
||||
LL | S[0];
|
||||
| ^^^^ the size of `str` cannot be statically determined
|
||||
|
||||
error[E0161]: cannot move a value of type `dyn Debug`
|
||||
--> $DIR/dst-index.rs:34:5
|
||||
--> $DIR/dst-index-fail.rs:34:5
|
||||
|
|
||||
LL | T[0];
|
||||
| ^^^^ the size of `dyn Debug` cannot be statically determined
|
||||
|
||||
error[E0507]: cannot move out of index of `S`
|
||||
--> $DIR/dst-index.rs:31:5
|
||||
--> $DIR/dst-index-fail.rs:31:5
|
||||
|
|
||||
LL | S[0];
|
||||
| ^^^^ move occurs because value has type `str`, which does not implement the `Copy` trait
|
||||
|
||||
error[E0507]: cannot move out of index of `T`
|
||||
--> $DIR/dst-index.rs:34:5
|
||||
--> $DIR/dst-index-fail.rs:34:5
|
||||
|
|
||||
LL | T[0];
|
||||
| ^^^^ move occurs because value has type `dyn Debug`, which does not implement the `Copy` trait
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
//@ check-pass
|
||||
|
||||
#![feature(generic_const_items, min_generic_const_args)]
|
||||
#![allow(incomplete_features)]
|
||||
|
||||
type const CT<T: ?Sized>: usize = { <T as Trait>::N };
|
||||
|
||||
trait Trait {
|
||||
type const N: usize;
|
||||
}
|
||||
|
||||
impl<T: ?Sized> Trait for T {
|
||||
type const N:usize = 0;
|
||||
}
|
||||
|
||||
fn f(_x: [(); CT::<()>]) {}
|
||||
|
||||
fn main() {}
|
||||
|
|
@ -1,6 +1,4 @@
|
|||
// https://github.com/rust-lang/rust/issues/60218
|
||||
// Regression test for #60218
|
||||
//
|
||||
// Regression test for https://github.com/rust-lang/rust/issues/60218
|
||||
// This was reported to cause ICEs.
|
||||
|
||||
use std::iter::Map;
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
error[E0277]: the trait bound `&u32: Foo` is not satisfied
|
||||
--> $DIR/higher-trait-bounds-ice-60218.rs:19:19
|
||||
--> $DIR/higher-trait-bounds-ice-60218.rs:17:19
|
||||
|
|
||||
LL | trigger_error(vec![], |x: &u32| x)
|
||||
| ------------- ^^^^^^ the trait `Foo` is not implemented for `&u32`
|
||||
|
|
@ -7,12 +7,12 @@ LL | trigger_error(vec![], |x: &u32| x)
|
|||
| required by a bound introduced by this call
|
||||
|
|
||||
help: this trait has no implementations, consider adding one
|
||||
--> $DIR/higher-trait-bounds-ice-60218.rs:8:1
|
||||
--> $DIR/higher-trait-bounds-ice-60218.rs:6:1
|
||||
|
|
||||
LL | pub trait Foo {}
|
||||
| ^^^^^^^^^^^^^
|
||||
note: required by a bound in `trigger_error`
|
||||
--> $DIR/higher-trait-bounds-ice-60218.rs:14:72
|
||||
--> $DIR/higher-trait-bounds-ice-60218.rs:12:72
|
||||
|
|
||||
LL | pub fn trigger_error<I, F>(iterable: I, functor: F)
|
||||
| ------------- required by a bound in this function
|
||||
|
|
@ -1,35 +1,35 @@
|
|||
error: expected identifier, found reserved identifier `_`
|
||||
--> $DIR/issue-110164.rs:8:5
|
||||
--> $DIR/invalid-path-110164.rs:8:5
|
||||
|
|
||||
LL | use _::a;
|
||||
| ^ expected identifier, found reserved identifier
|
||||
|
||||
error: expected identifier, found reserved identifier `_`
|
||||
--> $DIR/issue-110164.rs:10:5
|
||||
--> $DIR/invalid-path-110164.rs:10:5
|
||||
|
|
||||
LL | use _::*;
|
||||
| ^ expected identifier, found reserved identifier
|
||||
|
||||
error: expected identifier, found reserved identifier `_`
|
||||
--> $DIR/issue-110164.rs:14:9
|
||||
--> $DIR/invalid-path-110164.rs:14:9
|
||||
|
|
||||
LL | use _::a;
|
||||
| ^ expected identifier, found reserved identifier
|
||||
|
||||
error: expected identifier, found reserved identifier `_`
|
||||
--> $DIR/issue-110164.rs:16:9
|
||||
--> $DIR/invalid-path-110164.rs:16:9
|
||||
|
|
||||
LL | use _::*;
|
||||
| ^ expected identifier, found reserved identifier
|
||||
|
||||
error[E0432]: unresolved import `self::*`
|
||||
--> $DIR/issue-110164.rs:4:5
|
||||
--> $DIR/invalid-path-110164.rs:4:5
|
||||
|
|
||||
LL | use self::*;
|
||||
| ^^^^^^^ cannot glob-import a module into itself
|
||||
|
||||
error[E0432]: unresolved import `crate::*`
|
||||
--> $DIR/issue-110164.rs:6:5
|
||||
--> $DIR/invalid-path-110164.rs:6:5
|
||||
|
|
||||
LL | use crate::*;
|
||||
| ^^^^^^^^ cannot glob-import a module into itself
|
||||
|
|
@ -1,35 +1,35 @@
|
|||
error: expected identifier, found reserved identifier `_`
|
||||
--> $DIR/issue-110164.rs:8:5
|
||||
--> $DIR/invalid-path-110164.rs:8:5
|
||||
|
|
||||
LL | use _::a;
|
||||
| ^ expected identifier, found reserved identifier
|
||||
|
||||
error: expected identifier, found reserved identifier `_`
|
||||
--> $DIR/issue-110164.rs:10:5
|
||||
--> $DIR/invalid-path-110164.rs:10:5
|
||||
|
|
||||
LL | use _::*;
|
||||
| ^ expected identifier, found reserved identifier
|
||||
|
||||
error: expected identifier, found reserved identifier `_`
|
||||
--> $DIR/issue-110164.rs:14:9
|
||||
--> $DIR/invalid-path-110164.rs:14:9
|
||||
|
|
||||
LL | use _::a;
|
||||
| ^ expected identifier, found reserved identifier
|
||||
|
||||
error: expected identifier, found reserved identifier `_`
|
||||
--> $DIR/issue-110164.rs:16:9
|
||||
--> $DIR/invalid-path-110164.rs:16:9
|
||||
|
|
||||
LL | use _::*;
|
||||
| ^ expected identifier, found reserved identifier
|
||||
|
||||
error[E0432]: unresolved import `self::*`
|
||||
--> $DIR/issue-110164.rs:4:5
|
||||
--> $DIR/invalid-path-110164.rs:4:5
|
||||
|
|
||||
LL | use self::*;
|
||||
| ^^^^^^^ cannot glob-import a module into itself
|
||||
|
||||
error[E0432]: unresolved import `crate::*`
|
||||
--> $DIR/issue-110164.rs:6:5
|
||||
--> $DIR/invalid-path-110164.rs:6:5
|
||||
|
|
||||
LL | use crate::*;
|
||||
| ^^^^^^^^ cannot glob-import a module into itself
|
||||
Loading…
Add table
Add a link
Reference in a new issue