diff options
author | Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com> | 2025-03-26 15:22:28 +0100 |
---|---|---|
committer | Arthur Cohen <arthur.cohen@embecosm.com> | 2025-03-31 21:07:16 +0200 |
commit | e545727c840b7359fa27543c598cfa6e4a32e0ff (patch) | |
tree | 3d504100f44df2f41d4b67478694944af71e67a6 | |
parent | 766d89d962fb7529e358ae46c760a3539e65aa93 (diff) | |
download | gcc-e545727c840b7359fa27543c598cfa6e4a32e0ff.zip gcc-e545727c840b7359fa27543c598cfa6e4a32e0ff.tar.gz gcc-e545727c840b7359fa27543c598cfa6e4a32e0ff.tar.bz2 |
gccrs: Fix core library test with proper canonical path
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>
-rw-r--r-- | gcc/testsuite/rust/compile/issue-2905-2.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/testsuite/rust/compile/issue-2905-2.rs b/gcc/testsuite/rust/compile/issue-2905-2.rs index 83c54ed..1c9516d 100644 --- a/gcc/testsuite/rust/compile/issue-2905-2.rs +++ b/gcc/testsuite/rust/compile/issue-2905-2.rs @@ -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; |