Skip to content

Register new snapshot, use slicing syntax everywhere #20721

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 5 commits into from
Jan 8, 2015

Conversation

japaric
Copy link
Member

@japaric japaric commented Jan 7, 2015

This PR removes the Index[Mut] traits from the prelude (which were temporarily added to help landing a PR). Note that you don't need to have those traits in scope to use the indexing sugar.

[breaking-change]


(I didn't address the NOTE(stage0) comments that didn't involve a #[cfg(stage0)] attribute in this PR (all of them are related to String/Show). However, I did try the changes specified in those comments in a local build but that ended breaking compiletest which resulted in ~1500 failed cfail tests, and I didn't investigate further. @seanmonstar you may want to look into it.)

r? @nick29581 / @alexcrichton

@aturon
Copy link
Member

aturon commented Jan 7, 2015

@japaric Amazing!

I think we should consider removing the slicing_syntax gate (which is already a bit of a misnomer, since it's applied even for examples like for x in 0..1000 { ... }).

@japaric
Copy link
Member Author

japaric commented Jan 7, 2015

Just noticed that I need to update a lot of &mut _ patterns too! This going to take a while...

@aturon
Copy link
Member

aturon commented Jan 8, 2015

LGTM

alexcrichton added a commit to alexcrichton/rust that referenced this pull request Jan 8, 2015
Conflicts:
	src/libcollections/vec.rs
	src/libcore/fmt/mod.rs
	src/librustc/lint/builtin.rs
	src/librustc/session/config.rs
	src/librustc_trans/trans/base.rs
	src/librustc_trans/trans/context.rs
	src/librustc_trans/trans/type_.rs
	src/librustc_typeck/check/_match.rs
	src/librustdoc/html/format.rs
	src/libsyntax/std_inject.rs
	src/libsyntax/util/interner.rs
	src/test/compile-fail/mut-pattern-mismatched.rs
@nrc
Copy link
Member

nrc commented Jan 8, 2015

btw, #20720 fixes the precedence issue with ranges, so where we currently have to use parens, you won't need to. E.g, &foo[a+1..]. It will need another snapshot though.

@bors bors merged commit 7d72719 into rust-lang:master Jan 8, 2015
@japaric japaric deleted the snap branch January 22, 2015 16:11
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.

5 participants