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

Rollup of 11 pull requests #34004

Merged
merged 23 commits into from
Jun 1, 2016
Merged

Rollup of 11 pull requests #34004

merged 23 commits into from
Jun 1, 2016

Conversation

cheercroaker and others added 23 commits May 3, 2016 19:57
As stated in rust-lang#31007 the copyright notice should reflect the year of original publication, thus avoiding useless updates every year.
…cking.

This was already rejected during expansion. Encountering malformed LHS or RHS during expansion is now considered a bug.
Implementing the Write trait for Cursors over slices is so light-weight that under some circumstances multiple writes can be fused into a single instruction. In general I think inlining these functions is a good idea because most of the code can be constant-folded and copy-propagated away.

Closes issue rust-lang#33916.
…h` returns `Err(true)`

In 1a374b8, (pr rust-lang#33046) fixed the error reporting of a specific
case, but the change that was introduced did not make sure that
`record_def` was called in all cases, which lead to an ICE in [1].
This change restores the original `else` case, but keeps the changes
that were committed in 1a374b8.

This commit fixes issue rust-lang#33293.

[1] `rustc::middle::mem_categorization::MemCategorizationContext::cat_pattern_`
To accomplish this, we alter the checks in `rustc::middle::stability` to
use the `StabilityLevel` defined in `syntax::attr` (which includes the
version in which the feature was stabilized) rather than the local
`StabilityLevel` in the same module, and make the
`declared_stable_lang_features` field of
`syntax::feature_gate::Features` hold a Vec of feature-name, span
tuples (in analogy to the `declared_lib_features` field) rather than
just spans.

This is in the matter of issue rust-lang#33394.
Mention initial year of publication only for the documentation copyright

I have corrected the "copyright expiration year" that was still 2015 in the documentation copyright notice.

According to rust-lang#31007 it seems that we could go one step further and simplify the copyright notice to only mention the year of original publication ("Copyright © 2011" in this case).

Let me know if you would prefer this copyright notice to only mention the year of original publication (please make sure that it is really 2011 as stated in the current version of the documentation, and not 2010 like Rust's code) and I'll make the simplification.
doc: format! may or may not handle streams in future

No need to talk about that here
…kfelix

Reject a LHS formed of a single sequence TT during `macro_rules!` checking.

This was already rejected during expansion. Encountering malformed LHS or RHS during expansion is now considered a bug.

Follow up to rust-lang#33689.

r? @pnkfelix

Note: this can break code that defines such macros but does not use them.
…chton

core: check pointer equality when comparing byte slices

If pointer address and length are the same, it should be the same slice.

In experiments, I've seen that this doesn't happen as often in debug builds, but release builds seem to optimize to using a single pointer more often.
make core::str::next_code_point work on arbitrary iterator
Inline simple Cursor write calls

Implementing the Write trait for Cursors over slices is so light-weight that under some circumstances multiple writes can be fused into a single instruction. In general I think inlining these functions is a good idea because most of the code can be constant-folded and copy-propagated away.

Closes issue rust-lang#33916.

r? @alexcrichton
…, r=petrochenkov

resolve: record pattern def when `resolve_pattern` returns `Err(true)`

I propose a fix for issue rust-lang#33293.

In 1a374b8, (pr rust-lang#33046) fixed the error reporting of a specific case, but the change that was introduced did not make sure that `record_def` was called in all cases, which lead to an ICE in [1].
This change restores the original `else` case, but keeps the changes that were committed in 1a374b8.

[1] `rustc::middle::mem_categorization::MemCategorizationContext::cat_pattern_`
normalize types in MIR typeck after erasing regions

this fixes the MIR bug @frankmcsherry encountered.

r? @eddyb
…notes_version_stabilized, r=brson

stable features lint warning mentions version stabilized

To accomplish this, we alter the checks in `rustc::middle::stability` to
use the `StabilityLevel` defined in `syntax::attr` (which includes the
version in which the feature was stabilized) rather than the local
`StabilityLevel` in the same module, and make the
`declared_stable_lang_features` field of
`syntax::feature_gate::Features` hold a Vec of feature-name, span
tuples (in analogy to the `declared_lib_features` field) rather than
just spans.

Fixes rust-lang#33394.

![stable_features_version_lint_before_and_after](https://cloud.githubusercontent.com/assets/1076988/15659237/5d952a3a-267c-11e6-9181-c9e612eefd7d.png)

r? @brson (tagging Brian because he [wrote](rust-lang#21958) the lint)
Take the def_map argument to TyCtxt::create_and_enter out of its RefCell.
@rust-highfive
Copy link
Collaborator

r? @arielb1

(rust_highfive has picked a reviewer for you, use r? to override)

@Manishearth
Copy link
Member Author

@bors r+ p=20

@bors
Copy link
Contributor

bors commented Jun 1, 2016

📌 Commit 42e593a has been approved by Manishearth

@Manishearth
Copy link
Member Author

@bors force

@bors
Copy link
Contributor

bors commented Jun 1, 2016

⌛ Testing commit 42e593a with merge 806a553...

bors added a commit that referenced this pull request Jun 1, 2016
Rollup of 11 pull requests

- Successful merges: #33385, #33606, #33841, #33892, #33896, #33915, #33921, #33967, #33970, #33973, #33977
- Failed merges:
@bors
Copy link
Contributor

bors commented Jun 1, 2016

💔 Test failed - auto-win-msvc-32-opt

@Manishearth
Copy link
Member Author

@bors retry force

  • link.exe broke

@bors bors merged commit 42e593a into rust-lang:master Jun 1, 2016
@Centril Centril added the rollup A PR which is a rollup label Oct 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rollup A PR which is a rollup
Projects
None yet
Development

Successfully merging this pull request may close these issues.