8000 Rollup of 8 pull requests by Centril · Pull Request #65115 · rust-lang/rust · GitHub
[go: up one dir, main page]

Skip to content

Rollup of 8 pull requests #65115

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

Closed
wants to merge 31 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
0797712
Stabilize Option::deref and Option::deref_mut
SimonSapin Sep 23, 2019
e8796ca
Do not ICE when dereferencing non-Copy raw pointer
estebank Oct 2, 2019
1222cc9
permit asyncawait-ondeck to be added by anyone
nikomatsakis Oct 3, 2019
1fcbd90
Update triagebot.toml
nikomatsakis Oct 3, 2019
ed60cf2
When encountering chained operators use heuristics to recover from ba…
estebank Sep 30, 2019
6c9f298
review comments
estebank Sep 30, 2019
d7dceaa
Account for missing turbofish in paths too
estebank Sep 30, 2019
d27683a
Prove bad turbofish parser recovery in test
estebank Sep 30, 2019
dfdc369
review comments
estebank Oct 1, 2019
f1499a8
review comments
estebank Oct 1, 2019
02f57f8
review comments
estebank Oct 3, 2019
76456e7
review comments
estebank Oct 4, 2019
2d87bac
replace GeneratorSubsts with SubstsRef
csmoe Oct 3, 2019
fa7a87b
generate GeneratorSubsts from SubstsRef
csmoe Oct 3, 2019
774ea80
replace GeneratorSubs 8000 ts inside related types
csmoe Oct 3, 2019
ef9fe10
remove GeneratorSubsts visitors
csmoe Oct 3, 2019
afc0bb9
clean up GeneratorSubsts
csmoe Oct 3, 2019
e9009c8
[const-prop] Fix ICE when trying to eval polymorphic promoted MIR
wesleywiser Oct 3, 2019
91a096a
move middle::liveness to rustc_passes
Mark-Simulacrum Oct 4, 2019
bb70782
middle::dead -> rustc_passes
Mark-Simulacrum Oct 4, 2019
82bfd8e
middle::entry -> rustc_passes
Mark-Simulacrum Oct 4, 2019
7c3f65b
middle::intrinsicck -> rustc_passes
Mark-Simulacrum Oct 4, 2019
d0a6805
Allow unused attributes to avoid incremental bug
Mark-Simulacrum Oct 4, 2019
bf8eb09
Rollup merge of #64708 - SimonSapin:option-deref, r=Centril
Centril Oct 4, 2019
db4ad42
Rollup merge of #64909 - estebank:turbofish-reloaded, r=Centril
Centril Oct 4, 2019
21e57ee
Rollup merge of #65011 - estebank:ice-o-matic, r=zackmdavis
Centril Oct 4, 2019
fad8a7b
Rollup merge of #65064 - rust-lang:permit-asyncawait-ondeck-by-anyone…
Centril Oct 4, 2019
6967617
Rollup merge of #65066 - wesleywiser:fix_const_prop_ice_on_polymorphi…
Centril Oct 4, 2019
cfd51ca
Rollup merge of #65100 - csmoe:generator, r=nikomatsakis
Centril Oct 4, 2019
7f520da
Rollup merge of #65105 - Mark-Simulacrum:split-librustc, r=nikomatsakis
Centril Oct 4, 2019
f320add
Rollup merge of #65106 - Mark-Simulacrum:unused-attr-allow, r=Centril
Centril Oct 4, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Stabilize Option::deref and Option::deref_mut
The tracking issue #50264
still has unresolved question for the corresponding `Result` methods.
  • Loading branch information
SimonSapin committed Sep 23, 2019
commit 0797712e295e6c67b39d57d0801de9d0c6f9b100
8 changes: 2 additions & 6 deletions src/libcore/option.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1102,7 +1102,6 @@ impl<T: Default> Option<T> {
}
}

#[unstable(feature = "inner_deref", reason = "newly added", issue = "50264")]
impl<T: Deref> Option<T> {
/// Converts from `Option<T>` (or `&Option<T>`) to `Option<&T::Target>`.
///
Expand All @@ -1114,20 +1113,18 @@ impl<T: Deref> Option<T> {
/// # Examples
///
/// ```
/// #![feature(inner_deref)]
///
/// let x: Option<String> = Some("hey".to_owned());
/// assert_eq!(x.as_deref(), Some("hey"));
///
/// let x: Option<String> = None;
/// assert_eq!(x.as_deref(), None);
/// ```
#[stable(feature = "option_deref", since = "1.40.0")]
pub fn as_deref(&self) -> Option<&T::Target> {
self.as_ref().map(|t| t.deref())
}
}

#[unstable(feature = "inner_deref", reason = "newly added", issue = "50264")]
impl<T: DerefMut> Option<T> {
/// Converts from `Option<T>` (or `&mut Option<T>`) to `Option<&mut T::Target>`.
///
Expand All @@ -1137,14 +1134,13 @@ impl<T: DerefMut> Option<T> {
/// # Examples
///
/// ```
/// #![feature(inner_deref)]
///
/// let mut x: Option<String> = Some("hey".to_owned());
/// assert_eq!(x.as_deref_mut().map(|x| {
/// x.make_ascii_uppercase();
/// x
/// }), Some("HEY".to_owned().as_mut_str()));
/// ```
#[stable(feature = "option_deref", since = "1.40.0")]
pub fn as_deref_mut(&mut self) -> Option<&mut T::Target> {
self.as_mut().map(|t| t.deref_mut())
}
Expand Down
1 change: 0 additions & 1 deletion src/librustc/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
#![feature(const_transmute)]
#![feature(core_intrinsics)]
#![feature(drain_filter)]
#![feature(inner_deref)]
#![cfg_attr(windows, feature(libc))]
#![feature(never_type)]
#![feature(exhaustive_patterns)]
Expand Down
1 change: 0 additions & 1 deletion src/librustc_resolve/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

#![doc(html_root_url = "https://doc.rust-lang.org/nightly/")]

#![feature(inner_deref)]
#![feature(crate_visibility_modifier)]
#![feature(label_break_value)]
#![feature(mem_take)]
Expand Down
1 change: 0 additions & 1 deletion src/librustc_save_analysis/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/")]
#![feature(nll)]
#![feature(inner_deref)]

#![recursion_limit="256"]

Expand Down
1 change: 0 additions & 1 deletion src/librustc_typeck/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ This API is completely unstable and subject to change.
#![feature(nll)]
#![feature(slice_patterns)]
#![feature(never_type)]
#![feature(inner_deref)]
#![feature(mem_take)]

#![recursion_limit="256"]
Expand Down
1 change: 0 additions & 1 deletion src/librustdoc/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
#![feature(crate_visibility_modifier)]
#![feature(const_fn)]
#![feature(drain_filter)]
#![feature(inner_deref)]
#![feature(never_type)]
#![feature(mem_take)]
#![feature(unicode_internals)]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#![feature(inner_deref)]

fn main() {
let _result = &Some(42).as_deref();
//~^ ERROR no method named `as_deref` found for type `std::option::Option<{integer}>`
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0599]: no method named `as_deref` found for type `std::option::Option<{integer}>` in the current scope
--> $DIR/option-as_deref.rs:4:29
--> $DIR/option-as_deref.rs:2:29
|
LL | let _result = &Some(42).as_deref();
| ^^^^^^^^ help: there is a method with a similar name: `as_ref`
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#![feature(inner_deref)]

fn main() {
let _result = &mut Some(42).as_deref_mut();
//~^ ERROR no method named `as_deref_mut` found for type `std::option::Option<{integer}>`
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0599]: no method named `as_deref_mut` found for type `std::option::Option<{integer}>` in the current scope
--> $DIR/option-as_deref_mut.rs:4:33
--> $DIR/option-as_deref_mut.rs:2:33
|
LL | let _result = &mut Some(42).as_deref_mut();
| ^^^^^^^^^^^^ method not found in `std::option::Option<{integer}>`
Expand Down
0