Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix 'unused import' warning. #6645

Closed
wants to merge 1 commit into from

Conversation

steveklabnik
Copy link
Member

Fixes #6630.

@@ -33,6 +32,9 @@ use unstable::intrinsics;
use vec;
use util;

#[cfg(stage0)]
use old_iter::{BaseIter, CopyableIter};
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Has this compiled? I looked into this and it can be fixed by just removing the BaseIter import (as the warning message says btw)

@steveklabnik
Copy link
Member Author

This does not work, I guess it's in stage 1 as well?

compile_and_link: x86_64-apple-darwin/stage1/lib/rustc/x86_64-apple-darwin/lib/libcore.dylib
/Users/steve/src/rust/src/libcore/vec.rs:332:28: 332:56 error: type `&['a]` does not implement any method in scope named `to_vec`
/Users/steve/src/rust/src/libcore/vec.rs:332                 result.push(slice(v, start, i).to_vec());
                                                                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/steve/src/rust/src/libcore/vec.rs:337:16: 337:45 error: type `&['a]` does not implement any method in scope named `to_vec`
/Users/steve/src/rust/src/libcore/vec.rs:337     result.push(slice(v, start, ln).to_vec());
                                                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/steve/src/rust/src/libcore/vec.rs:356:28: 356:56 error: type `&['a]` does not implement any method in scope named `to_vec`
/Users/steve/src/rust/src/libcore/vec.rs:356                 result.push(slice(v, start, i).to_vec());
                                                                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/steve/src/rust/src/libcore/vec.rs:363:16: 363:45 error: type `&['a]` does not implement any method in scope named `to_vec`
/Users/steve/src/rust/src/libcore/vec.rs:363     result.push(slice(v, start, ln).to_vec());
                                                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/steve/src/rust/src/libcore/vec.rs:381:28: 381:58 error: type `&['a]` does not implement any method in scope named `to_vec`
/Users/steve/src/rust/src/libcore/vec.rs:381                 result.push(slice(v, i + 1, end).to_vec());
                                                                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/steve/src/rust/src/libcore/vec.rs:386:16: 386:43 error: type `&['a]` does not implement any method in scope named `to_vec`
/Users/steve/src/rust/src/libcore/vec.rs:386     result.push(slice(v, 0u, end).to_vec());
                                                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/steve/src/rust/src/libcore/vec.rs:406:28: 406:59 error: type `&['a]` does not implement any method in scope named `to_vec`
/Users/steve/src/rust/src/libcore/vec.rs:406                 result.push(slice(v, i + 1u, end).to_vec());
                                                                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/steve/src/rust/src/libcore/vec.rs:413:16: 413:43 error: type `&['a]` does not implement any method in scope named `to_vec`
/Users/steve/src/rust/src/libcore/vec.rs:413     result.push(slice(v, 0u, end).to_vec());

@alexcrichton
Copy link
Member

You might have some other changes in play here. On revision 84233c0 with the patch

diff --git a/src/libcore/vec.rs b/src/libcore/vec.rs
index 14dcde2..65f8dab 100644
--- a/src/libcore/vec.rs
+++ b/src/libcore/vec.rs
@@ -22,7 +22,7 @@ use old_iter;
 use iterator::Iterator;
 use kinds::Copy;
 use libc;
-use old_iter::{BaseIter, CopyableIter};
+use old_iter::CopyableIter;
 use option::{None, Option, Some};
 use ptr::to_unsafe_ptr;
 use ptr;

I get no errors in both stage0 and stage1 when compiling libcore

@steveklabnik
Copy link
Member Author

Hrm. :(

I guess just apply that, then.

@steveklabnik steveklabnik deleted the fix_6630 branch May 20, 2013 17:41
flip1995 pushed a commit to flip1995/rust that referenced this pull request Jan 30, 2021
Fix website syntax highlighting

changelog: none

Fix syntax highlighting on website when the docs contain ` ```rust,ignore`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants