Skip to content

Clean up rustc warnings. #17970

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

Merged
merged 1 commit into from
Oct 14, 2014
Merged

Clean up rustc warnings. #17970

merged 1 commit into from
Oct 14, 2014

Conversation

nodakai
Copy link
Contributor

@nodakai nodakai commented Oct 12, 2014

These are basically all straightforward changes and should not impact behavior of the language.

for cap in caps.iter() {
let res = expand(cap.as_bytes(), [], vars);
for &cap in caps.iter() {
let res = get_res("", cap, [], vars);
Copy link
Member

Choose a reason for hiding this comment

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

Why was this changed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@huonw I just felt more confortable with following the same style at all places.

@alexcrichton
Copy link
Member

Thanks for the cleanup @nodakai!

compiletest: compact "linux" "macos" etc.as "unix".
liballoc: remove a superfluous "use".
libcollections: remove invocations of deprecated methods in favor of
    their suggested replacements and use "_" for a loop counter.
libcoretest: remove invocations of deprecated methods;  also add
    "allow(deprecated)" for testing a deprecated method itself.
libglob: use "cfg_attr".
libgraphviz: add a test for one of data constructors.
libgreen: remove a superfluous "use".
libnum: "allow(type_overflow)" for type cast into u8 in a test code.
librustc: names of static variables should be in upper case.
libserialize: v[i] instead of get().
libstd/ascii: to_lowercase() instead of to_lower().
libstd/bitflags: modify AnotherSetOfFlags to use i8 as its backend.
    It will serve better for testing various aspects of bitflags!.
libstd/collections: "allow(deprecated)" for testing a deprecated
    method itself.
libstd/io: remove invocations of deprecated methods and superfluous "use".
    Also add #[test] where it was missing.
libstd/num: introduce a helper function to effectively remove
    invocations of a deprecated method.
libstd/path and rand: remove invocations of deprecated methods and
    superfluous "use".
libstd/task and libsync/comm: "allow(deprecated)" for testing
    a deprecated method itself.
libsync/deque: remove superfluous "unsafe".
libsync/mutex and once: names of static variables should be in upper case.
libterm: introduce a helper function to effectively remove
    invocations of a deprecated method.

We still see a few warnings about using obsoleted native::task::spawn()
in the test modules for libsync.  I'm not sure how I should replace them
with std::task::TaksBuilder and native::task::NativeTaskBuilder
(dependency to libstd?)

Signed-off-by: NODA, Kai <[email protected]>
@nodakai
Copy link
Contributor Author

nodakai commented Oct 13, 2014

Did git rebase against HEAD and removed some more warnings.

#[allow(deprecated)] doesn't seem to work against module-wide deprecated ??

alexcrichton added a commit to alexcrichton/rust that referenced this pull request Oct 13, 2014
@bors bors merged commit f27ad3d into rust-lang:master Oct 14, 2014
@nodakai nodakai deleted the cleanup-warnings branch November 19, 2014 23:44
lnicola pushed a commit to lnicola/rust that referenced this pull request Aug 29, 2024
…r=Veykril

fix: Fix "Unwrap block" assist with block modifiers

The assist just assumes the `{` will be the first character, which led to strange outputs such as `nsafe {`.

Fixes rust-lang#17964.
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.

4 participants