Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
ee1c2d5
Remove `MetaItemListParser::all_{word,path}_list`, which are unused.
nnethercote May 20, 2025
a822e55
Remove an unnecessary lifetime.
nnethercote May 20, 2025
ea3b3fd
Remove `MetaItemParser::{word,word_without_args,path_is}`.
nnethercote May 20, 2025
2cd2d24
Remove `MetaItemParser::{path,deconstruct}`.
nnethercote May 20, 2025
e5c78de
Rename `MetaItemParser::path_without_args` as `MetaItemParser::path`.
nnethercote May 20, 2025
6b5b97a
Fix incorrect eq_unspanned in TokenStream
chenyukang May 26, 2025
d3347bb
remove eq_unspanned from TokenStream
chenyukang May 26, 2025
80e44de
remove f16: From<u16>
usamoi Jun 2, 2025
a20cf47
Lightly tweak docs for BTree{Map,Set}::extract_if
rs-sac Jun 2, 2025
e87f138
add tests
Qelxiros Jun 3, 2025
4996946
Add missing 2015 edition directives
Veykril Jun 3, 2025
21a739f
add tests for negative numbers
Qelxiros Jun 4, 2025
bded701
run `check::Std` as the final step
onur-ozkan Jun 4, 2025
e66948c
make it possible to request stage 0 std with `Builder::ensure`
onur-ozkan Jun 4, 2025
7af12a1
remove outdated RUSTC_SYSROOT handling for ci-rustc
onur-ozkan Jun 4, 2025
ed300d8
Improve some `Visitor` comments.
nnethercote Jun 4, 2025
ccf9a89
coretests: move float tests from num to floats module and use a more …
RalfJung Jun 1, 2025
294b944
Rollup merge of #141271 - nnethercote:attr-streamline, r=jdonszelmann
matthiaskrgr Jun 4, 2025
6141078
Rollup merge of #141570 - chenyukang:yukang-fix-eq_unspanned, r=worki…
matthiaskrgr Jun 4, 2025
37f0b5f
Rollup merge of #141857 - RalfJung:coretests-floats, r=tgross35
matthiaskrgr Jun 4, 2025
c53b07e
Rollup merge of #141893 - usamoi:lossless, r=tgross35
matthiaskrgr Jun 4, 2025
45fca57
Rollup merge of #141924 - rs-sac:extr-doc, r=jhpratt
matthiaskrgr Jun 4, 2025
e03863c
Rollup merge of #141939 - Qelxiros:139911-exact-div-tests, r=workingj…
matthiaskrgr Jun 4, 2025
95ef40e
Rollup merge of #141959 - ferrocene:lw/2015-edition-directives2, r=co…
matthiaskrgr Jun 4, 2025
dce8dd4
Rollup merge of #142002 - onur-ozkan:follow-ups2, r=jieyouxu
matthiaskrgr Jun 4, 2025
182e9f6
Rollup merge of #142007 - nnethercote:visitor-comments, r=chenyukang
matthiaskrgr Jun 4, 2025
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
Prev Previous commit
Next Next commit
Add missing 2015 edition directives
These tests specifically test 2015 edition behavior, so ensure that they can only be run with this edition
  • Loading branch information
Veykril committed Jun 3, 2025
commit 49969468b59287f905a001097de66ff9659b7b79
1 change: 1 addition & 0 deletions tests/ui/issues/issue-10806.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//@ edition: 2015
//@ run-pass
#![allow(unused_imports)]

Expand Down
1 change: 1 addition & 0 deletions tests/ui/issues/issue-12729.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//@ edition: 2015
//@ check-pass
#![allow(dead_code)]

Expand Down
1 change: 1 addition & 0 deletions tests/ui/issues/issue-13105.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//@ edition: 2015
//@ check-pass

trait Foo {
Expand Down
1 change: 1 addition & 0 deletions tests/ui/issues/issue-13775.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//@ edition: 2015
//@ check-pass

trait Foo {
Expand Down
1 change: 1 addition & 0 deletions tests/ui/issues/issue-15774.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//@ edition: 2015
//@ run-pass

#![deny(warnings)]
Expand Down
1 change: 1 addition & 0 deletions tests/ui/issues/issue-34074.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//@ edition: 2015
//@ check-pass
// Make sure several unnamed function parameters don't conflict with each other

Expand Down
1 change: 1 addition & 0 deletions tests/ui/issues/issue-50571.fixed
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//@ edition: 2015
//@ run-rustfix

#![allow(dead_code)]
Expand Down
1 change: 1 addition & 0 deletions tests/ui/issues/issue-50571.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//@ edition: 2015
//@ run-rustfix

#![allow(dead_code)]
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/issues/issue-50571.stderr
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0642]: patterns aren't allowed in methods without bodies
--> $DIR/issue-50571.rs:5:12
--> $DIR/issue-50571.rs:6:12
|
LL | fn foo([a, b]: [i32; 2]) {}
| ^^^^^^
Expand Down
1 change: 1 addition & 0 deletions tests/ui/issues/issue-86756.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//@ edition: 2015
trait Foo<T, T = T> {}
//~^ ERROR the name `T` is already used for a generic parameter in this item's generic parameters

Expand Down
10 changes: 5 additions & 5 deletions tests/ui/issues/issue-86756.stderr
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
error[E0403]: the name `T` is already used for a generic parameter in this item's generic parameters
--> $DIR/issue-86756.rs:1:14
--> $DIR/issue-86756.rs:2:14
|
LL | trait Foo<T, T = T> {}
| - ^ already used
| |
| first use of `T`

error[E0412]: cannot find type `dyn` in this scope
--> $DIR/issue-86756.rs:5:10
--> $DIR/issue-86756.rs:6:10
|
LL | eq::<dyn, Foo>
| ^^^ not found in this scope

warning: trait objects without an explicit `dyn` are deprecated
--> $DIR/issue-86756.rs:5:15
--> $DIR/issue-86756.rs:6:15
|
LL | eq::<dyn, Foo>
| ^^^
Expand All @@ -27,13 +27,13 @@ LL | eq::<dyn, dyn Foo>
| +++

error[E0107]: missing generics for trait `Foo`
--> $DIR/issue-86756.rs:5:15
--> $DIR/issue-86756.rs:6:15
|
LL | eq::<dyn, Foo>
| ^^^ expected at least 1 generic argument
|
note: trait defined here, with at least 1 generic parameter: `T`
--> $DIR/issue-86756.rs:1:7
--> $DIR/issue-86756.rs:2:7
|
LL | trait Foo<T, T = T> {}
| ^^^ -
Expand Down
1 change: 1 addition & 0 deletions tests/ui/lexer/lex-bad-str-literal-as-char-3.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
//@ revisions: rust2015 rust2018 rust2021
//@[rust2015] edition:2015
//@[rust2018] edition:2018
//@[rust2021] edition:2021
fn main() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0762]: unterminated character literal
--> $DIR/lex-bad-str-literal-as-char-3.rs:5:26
--> $DIR/lex-bad-str-literal-as-char-3.rs:6:26
|
LL | println!('hello world');
| ^^^
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0762]: unterminated character literal
--> $DIR/lex-bad-str-literal-as-char-3.rs:5:26
--> $DIR/lex-bad-str-literal-as-char-3.rs:6:26
|
LL | println!('hello world');
| ^^^
Expand Down
4 changes: 2 additions & 2 deletions tests/ui/lexer/lex-bad-str-literal-as-char-3.rust2021.stderr
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error: prefix `world` is unknown
--> $DIR/lex-bad-str-literal-as-char-3.rs:5:21
--> $DIR/lex-bad-str-literal-as-char-3.rs:6:21
|
LL | println!('hello world');
| ^^^^^ unknown prefix
Expand All @@ -12,7 +12,7 @@ LL + println!("hello world");
|

error[E0762]: unterminated character literal
--> $DIR/lex-bad-str-literal-as-char-3.rs:5:26
--> $DIR/lex-bad-str-literal-as-char-3.rs:6:26
|
LL | println!('hello world');
| ^^^
Expand Down
4 changes: 3 additions & 1 deletion tests/ui/lifetimes/bare-trait-object-borrowck.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#![allow(bare_trait_objects)]
//@ edition: 2015
//@ check-pass
#![allow(bare_trait_objects)]

pub struct FormatWith<'a, I, F> {
sep: &'a str,
/// FormatWith uses interior mutability because Display::fmt takes &self.
Expand Down
1 change: 1 addition & 0 deletions tests/ui/lifetimes/bare-trait-object.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Verify that lifetime resolution correctly accounts for `Fn` bare trait objects.
//@ edition: 2015
//@ check-pass
#![allow(bare_trait_objects)]

Expand Down
1 change: 1 addition & 0 deletions tests/ui/lint/bare-trait-objects-path.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//@ edition: 2015
#![feature(associated_type_defaults)]

trait Assoc {
Expand Down
10 changes: 5 additions & 5 deletions tests/ui/lint/bare-trait-objects-path.stderr
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
warning: trait objects without an explicit `dyn` are deprecated
--> $DIR/bare-trait-objects-path.rs:14:5
--> $DIR/bare-trait-objects-path.rs:15:5
|
LL | Dyn::func();
| ^^^
Expand All @@ -13,7 +13,7 @@ LL | <dyn Dyn>::func();
| ++++ +

warning: trait objects without an explicit `dyn` are deprecated
--> $DIR/bare-trait-objects-path.rs:17:5
--> $DIR/bare-trait-objects-path.rs:18:5
|
LL | ::Dyn::func();
| ^^^^^
Expand All @@ -26,7 +26,7 @@ LL | <dyn (::Dyn)>::func();
| ++++++ ++

warning: trait objects without an explicit `dyn` are deprecated
--> $DIR/bare-trait-objects-path.rs:20:5
--> $DIR/bare-trait-objects-path.rs:21:5
|
LL | Dyn::CONST;
| ^^^
Expand All @@ -39,7 +39,7 @@ LL | <dyn Dyn>::CONST;
| ++++ +

warning: trait objects without an explicit `dyn` are deprecated
--> $DIR/bare-trait-objects-path.rs:23:12
--> $DIR/bare-trait-objects-path.rs:24:12
|
LL | let _: Dyn::Ty;
| ^^^
Expand All @@ -52,7 +52,7 @@ LL | let _: <dyn Dyn>::Ty;
| ++++ +

error[E0223]: ambiguous associated type
--> $DIR/bare-trait-objects-path.rs:23:12
--> $DIR/bare-trait-objects-path.rs:24:12
|
LL | let _: Dyn::Ty;
| ^^^^^^^
Expand Down
1 change: 1 addition & 0 deletions tests/ui/lint/lint-pre-expansion-extern-module.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//@ check-pass
//@ compile-flags: -W rust-2018-compatibility
//@ edition: 2015

fn main() {}

Expand Down
1 change: 1 addition & 0 deletions tests/ui/lint/lint-qualification.fixed
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//@ edition: 2015
//@ run-rustfix
#![deny(unused_qualifications)]
#![deny(unused_imports)]
Expand Down
1 change: 1 addition & 0 deletions tests/ui/lint/lint-qualification.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//@ edition: 2015
//@ run-rustfix
#![deny(unused_qualifications)]
#![deny(unused_imports)]
Expand Down
18 changes: 9 additions & 9 deletions tests/ui/lint/lint-qualification.stderr
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
error: unnecessary qualification
--> $DIR/lint-qualification.rs:12:5
--> $DIR/lint-qualification.rs:13:5
|
LL | foo::bar();
| ^^^^^^^^
|
note: the lint level is defined here
--> $DIR/lint-qualification.rs:2:9
--> $DIR/lint-qualification.rs:3:9
|
LL | #![deny(unused_qualifications)]
| ^^^^^^^^^^^^^^^^^^^^^
Expand All @@ -16,7 +16,7 @@ LL + bar();
|

error: unnecessary qualification
--> $DIR/lint-qualification.rs:13:5
--> $DIR/lint-qualification.rs:14:5
|
LL | crate::foo::bar();
| ^^^^^^^^^^^^^^^
Expand All @@ -28,7 +28,7 @@ LL + bar();
|

error: unnecessary qualification
--> $DIR/lint-qualification.rs:18:13
--> $DIR/lint-qualification.rs:19:13
|
LL | let _ = std::string::String::new();
| ^^^^^^^^^^^^^^^^^^^^^^^^
Expand All @@ -40,7 +40,7 @@ LL + let _ = String::new();
|

error: unnecessary qualification
--> $DIR/lint-qualification.rs:20:12
--> $DIR/lint-qualification.rs:21:12
|
LL | let _: std::vec::Vec<String> = std::vec::Vec::<String>::new();
| ^^^^^^^^^^^^^^^^^^^^^
Expand All @@ -52,7 +52,7 @@ LL + let _: Vec<String> = std::vec::Vec::<String>::new();
|

error: unnecessary qualification
--> $DIR/lint-qualification.rs:20:36
--> $DIR/lint-qualification.rs:21:36
|
LL | let _: std::vec::Vec<String> = std::vec::Vec::<String>::new();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Expand All @@ -64,19 +64,19 @@ LL + let _: std::vec::Vec<String> = Vec::<String>::new();
|

error: unused import: `std::fmt`
--> $DIR/lint-qualification.rs:24:9
--> $DIR/lint-qualification.rs:25:9
|
LL | use std::fmt;
| ^^^^^^^^
|
note: the lint level is defined here
--> $DIR/lint-qualification.rs:3:9
--> $DIR/lint-qualification.rs:4:9
|
LL | #![deny(unused_imports)]
| ^^^^^^^^^^^^^^

error: unnecessary qualification
--> $DIR/lint-qualification.rs:29:13
--> $DIR/lint-qualification.rs:30:13
|
LL | let _ = <bool as std::default::Default>::default(); // issue #121999 (modified)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//@ edition: 2015
//@ check-pass
#![warn(redundant_imports)]

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
warning: the item `Some` is imported redundantly
--> $DIR/use-redundant-prelude-rust-2015.rs:5:5
--> $DIR/use-redundant-prelude-rust-2015.rs:6:5
|
LL | use std::option::Option::Some;
| ^^^^^^^^^^^^^^^^^^^^^^^^^
Expand All @@ -8,13 +8,13 @@ LL | use std::option::Option::Some;
= note: the item `Some` is already defined here
|
note: the lint level is defined here
--> $DIR/use-redundant-prelude-rust-2015.rs:2:9
--> $DIR/use-redundant-prelude-rust-2015.rs:3:9
|
LL | #![warn(redundant_imports)]
| ^^^^^^^^^^^^^^^^^

warning: the item `None` is imported redundantly
--> $DIR/use-redundant-prelude-rust-2015.rs:6:5
--> $DIR/use-redundant-prelude-rust-2015.rs:7:5
|
LL | use std::option::Option::None;
| ^^^^^^^^^^^^^^^^^^^^^^^^^
Expand All @@ -23,7 +23,7 @@ LL | use std::option::Option::None;
= note: the item `None` is already defined here

warning: the item `Ok` is imported redundantly
--> $DIR/use-redundant-prelude-rust-2015.rs:8:5
--> $DIR/use-redundant-prelude-rust-2015.rs:9:5
|
LL | use std::result::Result::Ok;
| ^^^^^^^^^^^^^^^^^^^^^^^
Expand All @@ -32,7 +32,7 @@ LL | use std::result::Result::Ok;
= note: the item `Ok` is already defined here

warning: the item `Err` is imported redundantly
--> $DIR/use-redundant-prelude-rust-2015.rs:9:5
--> $DIR/use-redundant-prelude-rust-2015.rs:10:5
|
LL | use std::result::Result::Err;
| ^^^^^^^^^^^^^^^^^^^^^^^^
Expand Down
1 change: 1 addition & 0 deletions tests/ui/macros/try-macro.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
//@ run-pass
//@ edition: 2015
#![allow(deprecated)] // for deprecated `try!()` macro
use std::num::{ParseFloatError, ParseIntError};

Expand Down
2 changes: 2 additions & 0 deletions tests/ui/parser/dyn-trait-compatibility.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//@ edition: 2015

type A0 = dyn;
//~^ ERROR cannot find type `dyn` in this scope
type A1 = dyn::dyn;
Expand Down
16 changes: 8 additions & 8 deletions tests/ui/parser/dyn-trait-compatibility.stderr
Original file line number Diff line number Diff line change
@@ -1,47 +1,47 @@
error[E0412]: cannot find type `dyn` in this scope
--> $DIR/dyn-trait-compatibility.rs:1:11
--> $DIR/dyn-trait-compatibility.rs:3:11
|
LL | type A0 = dyn;
| ^^^ not found in this scope

error[E0412]: cannot find type `dyn` in this scope
--> $DIR/dyn-trait-compatibility.rs:5:11
--> $DIR/dyn-trait-compatibility.rs:7:11
|
LL | type A2 = dyn<dyn, dyn>;
| ^^^ not found in this scope

error[E0412]: cannot find type `dyn` in this scope
--> $DIR/dyn-trait-compatibility.rs:5:15
--> $DIR/dyn-trait-compatibility.rs:7:15
|
LL | type A2 = dyn<dyn, dyn>;
| ^^^ not found in this scope

error[E0412]: cannot find type `dyn` in this scope
--> $DIR/dyn-trait-compatibility.rs:5:20
--> $DIR/dyn-trait-compatibility.rs:7:20
|
LL | type A2 = dyn<dyn, dyn>;
| ^^^ not found in this scope

error[E0412]: cannot find type `dyn` in this scope
--> $DIR/dyn-trait-compatibility.rs:9:11
--> $DIR/dyn-trait-compatibility.rs:11:11
|
LL | type A3 = dyn<<dyn as dyn>::dyn>;
| ^^^ not found in this scope

error[E0405]: cannot find trait `dyn` in this scope
--> $DIR/dyn-trait-compatibility.rs:9:23
--> $DIR/dyn-trait-compatibility.rs:11:23
|
LL | type A3 = dyn<<dyn as dyn>::dyn>;
| ^^^ not found in this scope

error[E0412]: cannot find type `dyn` in this scope
--> $DIR/dyn-trait-compatibility.rs:9:16
--> $DIR/dyn-trait-compatibility.rs:11:16
|
LL | type A3 = dyn<<dyn as dyn>::dyn>;
| ^^^ not found in this scope

error[E0433]: failed to resolve: use of unresolved module or unlinked crate `dyn`
--> $DIR/dyn-trait-compatibility.rs:3:11
--> $DIR/dyn-trait-compatibility.rs:5:11
|
LL | type A1 = dyn::dyn;
| ^^^ use of unresolved module or unlinked crate `dyn`
Expand Down
Loading
Loading