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

Support ? Kleene macro operator in 2015 #60932

Merged
merged 7 commits into from Jun 9, 2019

Conversation

@Centril
Copy link
Member

commented May 18, 2019

Closes #56668.

See that issue for rationale and discussion.

Crater will be needed (done in #60932 (comment), zero regressions) and then, if all goes well, FCP (in #60932 (comment)).

@rust-highfive

This comment has been minimized.

Copy link
Collaborator

commented May 18, 2019

r? @michaelwoerister

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

@Centril

This comment has been minimized.

Copy link
Member Author

commented May 18, 2019

@bors try

@bors

This comment has been minimized.

Copy link
Contributor

commented May 18, 2019

⌛️ Trying commit 695b601 with merge 097e262...

bors added a commit that referenced this pull request May 18, 2019
Auto merge of #60932 - Centril:macro-at-most-once-2015, r=<try>
Support ? Kleene macro operator in 2015

Closes #56668.

See that issue for rationale and discussion.

Crater will be needed and then, if all goes well, FCP.

@Centril Centril added the relnotes label May 18, 2019

@Centril Centril added this to the 1.37 milestone May 18, 2019

@bors

This comment has been minimized.

Copy link
Contributor

commented May 18, 2019

☀️ Try build successful - checks-travis
Build commit: 097e262

@Centril

This comment has been minimized.

Copy link
Member Author

commented May 18, 2019

@craterbot run mode=check-only

@craterbot

This comment has been minimized.

Copy link
Collaborator

commented May 18, 2019

👌 Experiment pr-60932 created and queued.
🤖 Automatically detected try build 097e262
🔍 You can check out the queue and this experiment's details.

ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

@craterbot

This comment has been minimized.

Copy link
Collaborator

commented May 19, 2019

🚧 Experiment pr-60932 is now running on agent aws-3-tmp.

ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

@michaelwoerister

This comment has been minimized.

Copy link
Contributor

commented May 20, 2019

r? @nikomatsakis for re-assignment. I don't really know what this is about.

@craterbot

This comment has been minimized.

Copy link
Collaborator

commented May 20, 2019

🎉 Experiment pr-60932 is completed!
📊 0 regressed and 0 fixed (60951 total)
📰 Open the full report.

⚠️ If you notice any spurious failure please add them to the blacklist!
ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

@Centril

This comment has been minimized.

Copy link
Member Author

commented May 20, 2019

r? @petrochenkov for actual code review.

@rfcbot merge

Per note in #56668 (comment) we said that we would do this if crater said it didn't break anyone and indeed it does not. Therefore, I propose that we extend support for ? as the Kleene at-most-one macro operator to 2015. The rationale is provided in #56668 (comment). The gist of it is that we want to reduce technical debt in the compiler, the spec, and also reduce edition differences that must be learned. The original stabilization report summarizing the behavior on 2018 can be found in #48075 (comment).

@rfcbot

This comment has been minimized.

Copy link

commented May 20, 2019

Team member @Centril has proposed to merge this. The next step is review by the rest of the tagged team members:

No concerns currently listed.

Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up!

See this document for info about what commands tagged team members can give me.

@Centril

This comment has been minimized.

Copy link
Member Author

commented May 20, 2019

N.B. Aaron is on leave so I've checked his box.

@mark-i-m

This comment has been minimized.

Copy link
Member

commented Jun 9, 2019

@bors r+

@bors

This comment has been minimized.

Copy link
Contributor

commented Jun 9, 2019

📌 Commit 1993bef has been approved by mark-i-m

@bors

This comment was marked as resolved.

Copy link
Contributor

commented Jun 9, 2019

🔒 Merge conflict

This pull request and the master branch diverged in a way that cannot be automatically merged. Please rebase on top of the latest master branch, and let the reviewer approve again.

How do I rebase?

Assuming self is your fork and upstream is this repository, you can resolve the conflict following these steps:

  1. git checkout macro-at-most-once-2015 (switch to your branch)
  2. git fetch upstream master (retrieve the latest master)
  3. git rebase upstream/master -p (rebase on top of it)
  4. Follow the on-screen instruction to resolve conflicts (check git status if you got lost).
  5. git push self macro-at-most-once-2015 --force-with-lease (update this PR)

You may also read Git Rebasing to Resolve Conflicts by Drew Blessing for a short tutorial.

Please avoid the "Resolve conflicts" button on GitHub. It uses git merge instead of git rebase which makes the PR commit history more difficult to read.

Sometimes step 4 will complete without asking for resolution. This is usually due to difference between how Cargo.lock conflict is handled during merge and rebase. This is normal, and you should still perform step 5 to update this PR.

Error message
Removing src/test/ui/macros/macro-at-most-once-rep-2015-ques-sep.stderr
Removing src/test/ui/macros/macro-at-most-once-rep-2015-ques-sep.rs
Removing src/test/ui/macros/macro-at-most-once-rep-2015-ques-rep.stderr
Removing src/test/ui/macros/macro-at-most-once-rep-2015-ques-rep.rs
Removing src/test/run-pass/macros/macro-at-most-once-rep.rs
Auto-merging src/libsyntax/ext/tt/quoted.rs
CONFLICT (content): Merge conflict in src/libsyntax/ext/tt/quoted.rs
Automatic merge failed; fix conflicts and then commit the result.

@bors

This comment was marked as resolved.

Copy link
Contributor

commented Jun 9, 2019

☔️ The latest upstream changes (presumably #61672) made this pull request unmergeable. Please resolve the merge conflicts.

@Centril Centril force-pushed the Centril:macro-at-most-once-2015 branch from 1993bef to 3ba82f7 Jun 9, 2019

@Centril

This comment has been minimized.

Copy link
Member Author

commented Jun 9, 2019

...rebased

@bors r=mark-i-m

@bors

This comment has been minimized.

Copy link
Contributor

commented Jun 9, 2019

📌 Commit 3ba82f7 has been approved by mark-i-m

@bors

This comment has been minimized.

Copy link
Contributor

commented Jun 9, 2019

⌛️ Testing commit 3ba82f7 with merge e6e60ef...

bors added a commit that referenced this pull request Jun 9, 2019
Auto merge of #60932 - Centril:macro-at-most-once-2015, r=mark-i-m
Support ? Kleene macro operator in 2015

Closes #56668.

See that issue for rationale and discussion.

Crater will be needed (done in #60932 (comment), zero regressions) and then, if all goes well, FCP (in #60932 (comment)).
@bors

This comment has been minimized.

Copy link
Contributor

commented Jun 9, 2019

☀️ Test successful - checks-travis, status-appveyor
Approved by: mark-i-m
Pushing e6e60ef to master...

@bors bors added the merged-by-bors label Jun 9, 2019

@bors bors merged commit 3ba82f7 into rust-lang:master Jun 9, 2019

2 checks passed

Travis CI - Pull Request Build Passed
Details
homu Test successful
Details

@Centril Centril deleted the Centril:macro-at-most-once-2015 branch Jun 9, 2019

netbsd-srcmastr pushed a commit to NetBSD/pkgsrc that referenced this pull request Aug 29, 2019
he
Update rust to version 1.37.0
Pkgsrc changes:
 * Add a patch to llvm to deal with const dli_saddr.
 * Adapt two other patches.
 * Cross-build currently fails, so i386, powerpc and sparc64 bootstrap
   kits for 1.37.0 are built natively.  Missing aarch64 hardware, so that's
   not available yet.
 * Bump bootstrap requirements to 1.36.0 except for armv7-unknown-netbsd-eabihf
   which I've not managed to cross-build.

Upstream changes:

Version 1.37.0 (2019-08-15)
==========================

Language
--------
- `#[must_use]` will now warn if the type is contained in a [tuple][61100],
  [`Box`][62228], or an [array][62235] and unused.
- [You can now use the `cfg` and `cfg_attr` attributes on
  generic parameters.][61547]
- [You can now use enum variants through type alias.][61682] e.g. You can
  write the following:
  ```rust
  type MyOption = Option<u8>;

  fn increment_or_zero(x: MyOption) -> u8 {
      match x {
          MyOption::Some(y) => y + 1,
          MyOption::None => 0,
      }
  }
  ```
- [You can now use `_` as an identifier for consts.][61347] e.g. You can write
  `const _: u32 = 5;`.
- [You can now use `#[repr(align(X)]` on enums.][61229]
- [The  `?`/_"Kleene"_ macro operator is now available in the
  2015 edition.][60932]

Compiler
--------
- [You can now enable Profile-Guided Optimization with the `-C profile-generate`
  and `-C profile-use` flags.][61268] For more information on how to use profile
  guided optimization, please refer to the [rustc book][rustc-book-pgo].
- [The `rust-lldb` wrapper script should now work again.][61827]

Libraries
---------
- [`mem::MaybeUninit<T>` is now ABI-compatible with `T`.][61802]

Stabilized APIs
---------------
- [`BufReader::buffer`]
- [`BufWriter::buffer`]
- [`Cell::from_mut`]
- [`Cell<[T]>::as_slice_of_cells`][`Cell<slice>::as_slice_of_cells`]
- [`DoubleEndedIterator::nth_back`]
- [`Option::xor`]
- [`Wrapping::reverse_bits`]
- [`i128::reverse_bits`]
- [`i16::reverse_bits`]
- [`i32::reverse_bits`]
- [`i64::reverse_bits`]
- [`i8::reverse_bits`]
- [`isize::reverse_bits`]
- [`slice::copy_within`]
- [`u128::reverse_bits`]
- [`u16::reverse_bits`]
- [`u32::reverse_bits`]
- [`u64::reverse_bits`]
- [`u8::reverse_bits`]
- [`usize::reverse_bits`]

Cargo
-----
- [`Cargo.lock` files are now included by default when publishing executable crates
  with executables.][cargo/7026]
- [You can now specify `default-run="foo"` in `[package]` to specify the
  default executable to use for `cargo run`.][cargo/7056]

Misc
----

Compatibility Notes
-------------------
- [Using `...` for inclusive range patterns will now warn by default.][61342]
  Please transition your code to using the `..=` syntax for inclusive
  ranges instead.
- [Using a trait object without the `dyn` will now warn by default.][61203]
  Please transition your code to use `dyn Trait` for trait objects instead.

[62228]: rust-lang/rust#62228
[62235]: rust-lang/rust#62235
[61802]: rust-lang/rust#61802
[61827]: rust-lang/rust#61827
[61547]: rust-lang/rust#61547
[61682]: rust-lang/rust#61682
[61268]: rust-lang/rust#61268
[61342]: rust-lang/rust#61342
[61347]: rust-lang/rust#61347
[61100]: rust-lang/rust#61100
[61203]: rust-lang/rust#61203
[61229]: rust-lang/rust#61229
[60932]: rust-lang/rust#60932
[cargo/7026]: rust-lang/cargo#7026
[cargo/7056]: rust-lang/cargo#7056
[`BufReader::buffer`]: https://doc.rust-lang.org/std/io/struct.BufReader.html#method.buffer
[`BufWriter::buffer`]: https://doc.rust-lang.org/std/io/struct.BufWriter.html#method.buffer
[`Cell::from_mut`]: https://doc.rust-lang.org/std/cell/struct.Cell.html#method.from_mut
[`Cell<slice>::as_slice_of_cells`]: https://doc.rust-lang.org/std/cell/struct.Cell.html#method.as_slice_of_cells
[`DoubleEndedIterator::nth_back`]: https://doc.rust-lang.org/std/iter/trait.DoubleEndedIterator.html#method.nth_back
[`Option::xor`]: https://doc.rust-lang.org/std/option/enum.Option.html#method.xor
[`RefCell::try_borrow_unguarded`]: https://doc.rust-lang.org/std/cell/struct.RefCell.html#method.try_borrow_unguarded
[`Wrapping::reverse_bits`]: https://doc.rust-lang.org/std/num/struct.Wrapping.html#method.reverse_bits
[`i128::reverse_bits`]: https://doc.rust-lang.org/std/primitive.i128.html#method.reverse_bits
[`i16::reverse_bits`]: https://doc.rust-lang.org/std/primitive.i16.html#method.reverse_bits
[`i32::reverse_bits`]: https://doc.rust-lang.org/std/primitive.i32.html#method.reverse_bits
[`i64::reverse_bits`]: https://doc.rust-lang.org/std/primitive.i64.html#method.reverse_bits
[`i8::reverse_bits`]: https://doc.rust-lang.org/std/primitive.i8.html#method.reverse_bits
[`isize::reverse_bits`]: https://doc.rust-lang.org/std/primitive.isize.html#method.reverse_bits
[`slice::copy_within`]: https://doc.rust-lang.org/std/primitive.slice.html#method.copy_within
[`u128::reverse_bits`]: https://doc.rust-lang.org/std/primitive.u128.html#method.reverse_bits
[`u16::reverse_bits`]: https://doc.rust-lang.org/std/primitive.u16.html#method.reverse_bits
[`u32::reverse_bits`]: https://doc.rust-lang.org/std/primitive.u32.html#method.reverse_bits
[`u64::reverse_bits`]: https://doc.rust-lang.org/std/primitive.u64.html#method.reverse_bits
[`u8::reverse_bits`]: https://doc.rust-lang.org/std/primitive.u8.html#method.reverse_bits
[`usize::reverse_bits`]: https://doc.rust-lang.org/std/primitive.usize.html#method.reverse_bits
[rustc-book-pgo]: https://doc.rust-lang.org/rustc/profile-guided-optimization.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.