diff options
| author | bors <bors@rust-lang.org> | 2025-09-03 14:20:23 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2025-09-03 14:20:23 +0000 |
| commit | fd75a9c32d643f39c8c61df770d2cff60b3fefd5 (patch) | |
| tree | c37bb00bebb8e080cb67262f51620a3ee816220f /tests | |
| parent | 51ff895062ba60a7cba53f57af928c3fb7b0f2f4 (diff) | |
| parent | 263048d06327d104e4e49d1288bc392c96c494fe (diff) | |
| download | rust-fd75a9c32d643f39c8c61df770d2cff60b3fefd5.tar.gz rust-fd75a9c32d643f39c8c61df770d2cff60b3fefd5.zip | |
Auto merge of #146160 - Zalathar:rollup-qxphx7g, r=Zalathar
Rollup of 8 pull requests Successful merges: - rust-lang/rust#145279 (Constify conversion traits (part 1)) - rust-lang/rust#145414 (unicode-table-generator refactors) - rust-lang/rust#145823 (editorconfig: don't use nonexistent syntax) - rust-lang/rust#145944 (std: Start supporting WASIp2 natively ) - rust-lang/rust#145961 (resolve: Avoid a regression from splitting prelude into two scopes) - rust-lang/rust#146032 (Explicity disable LSX feature for `loongarch64-unknown-none` target) - rust-lang/rust#146106 (fix(lexer): Only allow horizontal whitespace in frontmatter ) - rust-lang/rust#146154 (CI: rfl: move job forward to Linux v6.17-rc3 plus 2 commits) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/ui/.gitattributes | 1 | ||||
| -rw-r--r-- | tests/ui/frontmatter/frontmatter-contains-whitespace.rs | 22 | ||||
| -rw-r--r-- | tests/ui/frontmatter/frontmatter-crlf.rs | 14 | ||||
| -rw-r--r-- | tests/ui/frontmatter/frontmatter-whitespace-3.rs | 5 | ||||
| -rw-r--r-- | tests/ui/frontmatter/frontmatter-whitespace-4.rs | 3 | ||||
| -rw-r--r-- | tests/ui/imports/overwritten-extern-flag-ambig.rs | 13 | ||||
| -rw-r--r-- | tests/ui/traits/const-traits/enforce-deref-on-adjust.rs | 2 | ||||
| -rw-r--r-- | tests/ui/traits/const-traits/non-const-op-in-closure-in-const.rs | 2 | ||||
| -rw-r--r-- | tests/ui/traits/const-traits/reservation-impl-ice.rs | 2 |
9 files changed, 58 insertions, 6 deletions
diff --git a/tests/ui/.gitattributes b/tests/ui/.gitattributes index 9ea3d3fb0e1..4923ac100e1 100644 --- a/tests/ui/.gitattributes +++ b/tests/ui/.gitattributes @@ -3,4 +3,5 @@ json-bom-plus-crlf.rs -text json-bom-plus-crlf-multifile.rs -text json-bom-plus-crlf-multifile-aux.rs -text trailing-carriage-return-in-string.rs -text +frontmatter-crlf.rs -text *.bin -text diff --git a/tests/ui/frontmatter/frontmatter-contains-whitespace.rs b/tests/ui/frontmatter/frontmatter-contains-whitespace.rs new file mode 100644 index 00000000000..11df822f793 --- /dev/null +++ b/tests/ui/frontmatter/frontmatter-contains-whitespace.rs @@ -0,0 +1,22 @@ +#!/usr/bin/env -S cargo -Zscript +---cargo +# Beware editing: it has numerous whitespace characters which are important. +# It contains one ranges from the 'PATTERN_WHITE_SPACE' property outlined in +# https://unicode.org/Public/UNIDATA/PropList.txt +# +# The characters in the first expression of the assertion can be generated +# from: "4\u{0C}+\n\t\r7\t*\u{20}2\u{85}/\u{200E}3\u{200F}*\u{2028}2\u{2029}" +package.description = """ +4+ + +7 * 2 /3* 2 +""" +--- + +//@ check-pass + +// Ensure the frontmatter can contain any whitespace + +#![feature(frontmatter)] + +fn main() {} diff --git a/tests/ui/frontmatter/frontmatter-crlf.rs b/tests/ui/frontmatter/frontmatter-crlf.rs new file mode 100644 index 00000000000..b46cc9ddbb0 --- /dev/null +++ b/tests/ui/frontmatter/frontmatter-crlf.rs @@ -0,0 +1,14 @@ +#!/usr/bin/env -S cargo -Zscript +--- +[dependencies] +clap = "4" +--- + +//@ check-pass +// ignore-tidy-cr + +// crlf line endings should be accepted + +#![feature(frontmatter)] + +fn main() {} diff --git a/tests/ui/frontmatter/frontmatter-whitespace-3.rs b/tests/ui/frontmatter/frontmatter-whitespace-3.rs index 95e0981e2ae..6580514fba2 100644 --- a/tests/ui/frontmatter/frontmatter-whitespace-3.rs +++ b/tests/ui/frontmatter/frontmatter-whitespace-3.rs @@ -1,7 +1,7 @@ ----cargo ---- +---cargo +--- // please note the whitespace characters after the first four lines. // This ensures that we accept whitespaces before the frontmatter, after @@ -10,6 +10,7 @@ //@ check-pass // ignore-tidy-end-whitespace // ignore-tidy-leading-newlines +// ignore-tidy-tab #![feature(frontmatter)] diff --git a/tests/ui/frontmatter/frontmatter-whitespace-4.rs b/tests/ui/frontmatter/frontmatter-whitespace-4.rs index 3bda3227838..1e7c5556647 100644 --- a/tests/ui/frontmatter/frontmatter-whitespace-4.rs +++ b/tests/ui/frontmatter/frontmatter-whitespace-4.rs @@ -1,7 +1,8 @@ ---- cargo +--- cargo --- //@ check-pass +// ignore-tidy-tab // A frontmatter infostring can have leading whitespace. #![feature(frontmatter)] diff --git a/tests/ui/imports/overwritten-extern-flag-ambig.rs b/tests/ui/imports/overwritten-extern-flag-ambig.rs new file mode 100644 index 00000000000..80f394d34de --- /dev/null +++ b/tests/ui/imports/overwritten-extern-flag-ambig.rs @@ -0,0 +1,13 @@ +// Test for issue #145575. + +//@ check-pass +//@ edition: 2018 + +extern crate core as std; + +mod inner { + use crate::*; + use std::str; // OK for now +} + +fn main() {} diff --git a/tests/ui/traits/const-traits/enforce-deref-on-adjust.rs b/tests/ui/traits/const-traits/enforce-deref-on-adjust.rs index d5240b7e18d..cba207f0953 100644 --- a/tests/ui/traits/const-traits/enforce-deref-on-adjust.rs +++ b/tests/ui/traits/const-traits/enforce-deref-on-adjust.rs @@ -1,6 +1,6 @@ //@ check-pass -#![feature(const_deref)] +#![feature(const_convert)] #![feature(const_trait_impl)] use std::ops::Deref; diff --git a/tests/ui/traits/const-traits/non-const-op-in-closure-in-const.rs b/tests/ui/traits/const-traits/non-const-op-in-closure-in-const.rs index d5f80acc15b..50c985096d1 100644 --- a/tests/ui/traits/const-traits/non-const-op-in-closure-in-const.rs +++ b/tests/ui/traits/const-traits/non-const-op-in-closure-in-const.rs @@ -1,4 +1,4 @@ -#![feature(const_trait_impl, const_from)] +#![feature(const_trait_impl, const_convert)] //@ check-pass diff --git a/tests/ui/traits/const-traits/reservation-impl-ice.rs b/tests/ui/traits/const-traits/reservation-impl-ice.rs index efaea1cc6b2..7fefb4ec543 100644 --- a/tests/ui/traits/const-traits/reservation-impl-ice.rs +++ b/tests/ui/traits/const-traits/reservation-impl-ice.rs @@ -1,5 +1,5 @@ //@ compile-flags: -Znext-solver -#![feature(const_from, never_type, const_trait_impl)] +#![feature(const_convert, never_type, const_trait_impl)] const fn impls_from<T: ~const From<!>>() {} |
