aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>2025-03-26 15:22:28 +0100
committerP-E-P <32375388+P-E-P@users.noreply.github.com>2025-03-26 16:46:08 +0000
commitb322656cdc0e3beae61be8465adab23fbcc3dbbf (patch)
treedade763cf87e0647c224fcd02834159cca39b117
parent65574f04d69a922eac21308f09d794fc8fab6a8c (diff)
downloadgcc-b322656cdc0e3beae61be8465adab23fbcc3dbbf.zip
gcc-b322656cdc0e3beae61be8465adab23fbcc3dbbf.tar.gz
gcc-b322656cdc0e3beae61be8465adab23fbcc3dbbf.tar.bz2
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.rs8
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;