]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Fix core library test with proper canonical path
authorPierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Wed, 26 Mar 2025 14:22:28 +0000 (15:22 +0100)
committerP-E-P <32375388+P-E-P@users.noreply.github.com>
Wed, 26 Mar 2025 16:46:08 +0000 (16:46 +0000)
Import from core library was wrong, it misses several crate directives
since we're no longer dealing with multiple files.

gcc/testsuite/ChangeLog:

* rust/compile/issue-2905-2.rs: Import from core library into a single
file misses the crate directives.

Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
gcc/testsuite/rust/compile/issue-2905-2.rs

index 83c54ed92e5f62d798328f27e22e6c8e7527aa0f..1c9516df94614238d469652d4047b91b56d08854 100644 (file)
@@ -17,10 +17,10 @@ pub mod core {
     }
 
     pub mod slice {
-        use core::marker::PhantomData;
-        use core::option::Option;
+        use crate::core::marker::PhantomData;
+        use crate::core::option::Option;
 
-        impl<T> core::iter::IntoIterator for &[T] {
+        impl<T> crate::core::iter::IntoIterator for &[T] {
             type Item = &T;
             type IntoIter = Weird<T>;
 
@@ -108,7 +108,7 @@ pub mod core {
     }
 
     pub mod iter {
-        use option::Option;
+        use crate::core::option::Option;
 
         pub trait IntoIterator {
             type Item;