about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorThe Miri Cronjob Bot <miri@cron.bot>2025-09-04 05:00:34 +0000
committerThe Miri Cronjob Bot <miri@cron.bot>2025-09-04 05:00:34 +0000
commit94e40cd9c4aac126cd4c58ad9d1e8fbfc12724de (patch)
treee8acabf18ebf722dd56a65ddc69c47befc889c3c /tests
parentd9619ed1c54f7c20b74913982cf0715002380e10 (diff)
parentd8ca776f6de1d484afc9f847f558bd32b94ceced (diff)
downloadrust-94e40cd9c4aac126cd4c58ad9d1e8fbfc12724de.tar.gz
rust-94e40cd9c4aac126cd4c58ad9d1e8fbfc12724de.zip
Merge ref '9385c64c95d9' from rust-lang/rust
Pull recent changes from https://github.com/rust-lang/rust via Josh.

Upstream ref: 9385c64c95d971329e62917adc4349c8ccdbafe0
Filtered ref: 80818ce34771a13f1a67a706e7e283ba58bdc460

This merge was created using https://github.com/rust-lang/josh-sync.
Diffstat (limited to 'tests')
-rw-r--r--tests/ui/.gitattributes1
-rw-r--r--tests/ui/frontmatter/frontmatter-contains-whitespace.rs22
-rw-r--r--tests/ui/frontmatter/frontmatter-crlf.rs14
-rw-r--r--tests/ui/frontmatter/frontmatter-whitespace-3.rs5
-rw-r--r--tests/ui/frontmatter/frontmatter-whitespace-4.rs3
-rw-r--r--tests/ui/imports/overwritten-extern-flag-ambig.rs13
-rw-r--r--tests/ui/sanitizer/cfi/no_builtins.rs22
-rw-r--r--tests/ui/traits/const-traits/enforce-deref-on-adjust.rs2
-rw-r--r--tests/ui/traits/const-traits/non-const-op-in-closure-in-const.rs2
-rw-r--r--tests/ui/traits/const-traits/reservation-impl-ice.rs2
10 files changed, 58 insertions, 28 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/sanitizer/cfi/no_builtins.rs b/tests/ui/sanitizer/cfi/no_builtins.rs
deleted file mode 100644
index 949057689ab..00000000000
--- a/tests/ui/sanitizer/cfi/no_builtins.rs
+++ /dev/null
@@ -1,22 +0,0 @@
-// Verifies that `#![no_builtins]` crates can be built with linker-plugin-lto and CFI.
-// See Issue #142284
-//
-//@ needs-sanitizer-cfi
-//@ compile-flags: -Clinker-plugin-lto -Copt-level=0 -Zsanitizer=cfi -Ctarget-feature=-crt-static
-//@ compile-flags: --crate-type rlib
-//@ build-pass
-
-#![no_builtins]
-#![no_std]
-
-pub static FUNC: fn() = initializer;
-
-pub fn initializer() {
-    call(fma_with_fma);
-}
-
-pub fn call(fn_ptr: fn()) {
-    fn_ptr();
-}
-
-pub fn fma_with_fma() {}
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<!>>() {}