diff --git a/Cargo.lock b/Cargo.lock
index 369c6c8ae4746..a4f30d1ebcf82 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -475,7 +475,6 @@ version = "0.0.0"
dependencies = [
"diff 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)",
"env_logger 0.5.13 (registry+https://github.com/rust-lang/crates.io-index)",
- "filetime 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
"getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)",
diff --git a/src/etc/natvis/liballoc.natvis b/src/etc/natvis/liballoc.natvis
index e3d99e34b3579..de30b58526a13 100644
--- a/src/etc/natvis/liballoc.natvis
+++ b/src/etc/natvis/liballoc.natvis
@@ -7,11 +7,11 @@
- buf.cap
len
- buf.ptr.pointer.__0
+ buf.ptr.pointer
-
+
{{ size={tail <= head ? head - tail : buf.cap - tail + head} }}
- tail <= head ? head - tail : buf.cap - tail + head
@@ -24,19 +24,19 @@
- - buf.ptr.pointer.__0 + i
+ - buf.ptr.pointer[i]
i = (i + 1 == buf.cap ? 0 : i + 1)
-
+
{{ size={len} }}
len
- *(alloc::linked_list::Node<$T1> **)&head
- *(alloc::linked_list::Node<$T1> **)&next
+ *(alloc::collections::linked_list::Node<$T1> **)&head
+ *(alloc::collections::linked_list::Node<$T1> **)&next
element
diff --git a/src/etc/natvis/libcore.natvis b/src/etc/natvis/libcore.natvis
index 37d64be1ce963..0e703b3b95026 100644
--- a/src/etc/natvis/libcore.natvis
+++ b/src/etc/natvis/libcore.natvis
@@ -1,15 +1,15 @@
- {{ Unique {*pointer.__0} }}
+ {{ Unique {pointer} }}
- - pointer.__0
+ - pointer
- {{ Shared {*pointer.__0} }}
+ {{ Shared {pointer} }}
- - pointer.__0
+ - pointer
diff --git a/src/librustc/hir/lowering.rs b/src/librustc/hir/lowering.rs
index dd0d13d8f5a6a..3a8b139236cca 100644
--- a/src/librustc/hir/lowering.rs
+++ b/src/librustc/hir/lowering.rs
@@ -97,6 +97,10 @@ pub struct LoweringContext<'a> {
is_generator: bool,
is_async_body: bool,
+ /// Used to get the current `fn`'s def span to point to when using `await`
+ /// outside of an `async fn`.
+ current_item: Option,
+
catch_scopes: Vec,
loop_scopes: Vec,
is_in_loop_condition: bool,
@@ -250,6 +254,7 @@ pub fn lower_crate(
node_id_to_hir_id: IndexVec::new(),
is_generator: false,
is_async_body: false,
+ current_item: None,
is_in_trait_impl: false,
lifetimes_to_define: Vec::new(),
is_collecting_in_band_lifetimes: false,
@@ -3116,6 +3121,7 @@ impl<'a> LoweringContext<'a> {
ItemKind::Fn(ref decl, ref header, ref generics, ref body) => {
let fn_def_id = self.resolver.definitions().local_def_id(id);
self.with_new_scopes(|this| {
+ this.current_item = Some(ident.span);
let mut lower_fn = |decl: &FnDecl| {
// Note: we don't need to change the return type from `T` to
// `impl Future