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 26 pull requests #57542

Merged
merged 73 commits into from
Jan 12, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
5c11392
Redo the docs for Vec::set_len
scottmcm Dec 2, 2018
ac642ab
Update the comment some more following CR feedback
scottmcm Dec 12, 2018
0eacf2c
Sidestep ICE in `FieldPlacement::count` by not calling it when count …
pnkfelix Dec 21, 2018
61fb909
Update src/liballoc/vec.rs
Centril Jan 3, 2019
40658fd
Fixed the link to the ? operator
JosephTLyons Jan 3, 2019
42e65c1
Use CMAKE_{C,CXX}_COMPILER_LAUNCHER for ccache
petrhosek Jan 6, 2019
239ac2b
Source Serif Pro regular and bold 2.007, and italic 1.007
tspiteri Jan 7, 2019
aa257ec
Replace Heuristica with Source Serif Pro italic in rustdoc.css
tspiteri Jan 7, 2019
d2ac094
Update static files code for updated Source Serif Pro font
tspiteri Jan 7, 2019
dac6eec
semi-revert libsyntax doctest parsing if a macro is wrapping main
QuietMisdreavus Dec 20, 2018
68b8b43
Add link destination for `read-ownership`
ecstatic-morse Jan 8, 2019
8780ebf
Remove `CrateNum::Invalid`.
nnethercote Jan 8, 2019
4166a4e
Supporting backtrace for x86_64-fortanix-unknown-sgx.
Jan 3, 2019
564a24c
Change std::error::Error trait documentation to talk about `source` i…
czipperz Dec 29, 2018
d1b65fb
Add issue reference to E0202 message
varkor Jan 8, 2019
ac4a454
Consolidate equality constraints error message
varkor Jan 8, 2019
47db51e
Issue 56905
blitzerr Dec 17, 2018
410b529
Creating the vector using with_capacity to avoid re-allocation later …
blitzerr Dec 19, 2018
7853b78
Some more refactoring.
blitzerr Dec 22, 2018
15d8e8f
[Cleanup] This is the first in the series of removals of with_freevar…
blitzerr Dec 22, 2018
5052197
explain safety for vec.set_len(0)
Centril Jan 9, 2019
69e4918
addressing Niko's comments
blitzerr Jan 9, 2019
986e49d
Merge pull request #1 from Centril/redo-vec-set_len-docs-adjust
scottmcm Jan 9, 2019
a89cece
docs: Fix some 'second-edition' links
phansch Jan 9, 2019
4b4fc63
Stabilize `let` bindings and destructuring in constants and const fn
oli-obk Dec 28, 2018
a49acea
Clarify const_let comment
oli-obk Dec 30, 2018
aef6288
const fn feature gate is not needed anymore in a lot of tests
oli-obk Dec 30, 2018
80262e6
Fix irrefutable slice patterns in const fn
oli-obk Jan 9, 2019
0e56e13
Remove outdated comment
king6cong Jan 9, 2019
2e4766c
Exposing enclave image-base to the enclave application
Jan 9, 2019
4a454d6
actually take a slice in this example
steveklabnik Jan 8, 2019
29a8386
use structured suggestion when casting a reference
euclio Jan 10, 2019
f282f6b
make note of one more normalization that Paths do
steveklabnik Jan 10, 2019
beb6495
note that FromStr does not work for borrowed types
steveklabnik Jan 10, 2019
e598ea8
Update src/libstd/path.rs
Centril Jan 10, 2019
27989ec
Remove submodule step from README
nrc Jan 11, 2019
4103e5b
Add a profiles section to the manifest
nrc Jan 11, 2019
928efca
Fix undefined behavior
Jan 11, 2019
16a4e47
Remove unneeded but benign change
oli-obk Jan 11, 2019
434fe4e
Correct RELEASES.md for 1.32.0
pthariensflame Jan 11, 2019
020e1f5
don't unwrap unexpected tokens in `format!`
euclio Jan 11, 2019
fdd2f0d
Fix new hyperlinks in RELEASES.md
pthariensflame Jan 11, 2019
49e8318
Fixing a typographical error.
insideoutclub Jan 11, 2019
afcb938
Stabilise irrefutable if-let and while-let patterns
varkor Jan 12, 2019
0e1402d
bless ui/while-let
Centril Jan 12, 2019
3dc08ed
move const_let accepted gate to avoid future conflict.
Centril Jan 12, 2019
6c62322
const_let: --bless with --compare-mode=nll
Centril Jan 12, 2019
e69a5cb
Rollup merge of #56425 - scottmcm:redo-vec-set_len-docs, r=Centril
Centril Jan 12, 2019
53aa8a1
Rollup merge of #56906 - blitzerr:master, r=nikomatsakis
Centril Jan 12, 2019
017f046
Rollup merge of #57042 - pnkfelix:issue-57038-sidestep-ice-in-fieldpl…
Centril Jan 12, 2019
bd8f464
Rollup merge of #57175 - oli-obk:const_let_stabilization, r=nikomatsakis
Centril Jan 12, 2019
40a819b
Rollup merge of #57192 - czipperz:error_trait_doc_cause_to_source, r=…
Centril Jan 12, 2019
ebbecac
Rollup merge of #57296 - JosephTLyons:Fix-question-mark-operator-in-s…
Centril Jan 12, 2019
c6146b2
Rollup merge of #57368 - petrhosek:cmake-compiler-launcher, r=alexcri…
Centril Jan 12, 2019
7be2ff3
Rollup merge of #57400 - tspiteri:source-serif-pro-it, r=GuillaumeGomez
Centril Jan 12, 2019
a61ebac
Rollup merge of #57417 - QuietMisdreavus:semi-revert-doctest-parsing,…
Centril Jan 12, 2019
a9c9a2c
Rollup merge of #57433 - ecstatic-morse:issue-56610-bad-link, r=dtolnay
Centril Jan 12, 2019
632d890
Rollup merge of #57434 - nnethercote:rm-CrateNum-Invalid, r=petrochenkov
Centril Jan 12, 2019
85a7fc8
Rollup merge of #57441 - VardhanThigle:Vardhan/x86_64-fortanix-unknow…
Centril Jan 12, 2019
0b1427e
Rollup merge of #57450 - steveklabnik:gh45678, r=KodrAus
Centril Jan 12, 2019
f7da074
Rollup merge of #57459 - varkor:E0202-issue-reference, r=petrochenkov
Centril Jan 12, 2019
e7dc880
Rollup merge of #57463 - phansch:fix_some_links, r=steveklabnik
Centril Jan 12, 2019
1fff64a
Rollup merge of #57466 - king6cong:comment, r=alexcrichton
Centril Jan 12, 2019
e0cea0d
Rollup merge of #57493 - euclio:deref-suggest, r=oli-obk
Centril Jan 12, 2019
cbe377b
Rollup merge of #57498 - steveklabnik:gh29008, r=alexcrichton
Centril Jan 12, 2019
dc6d86b
Rollup merge of #57499 - steveklabnik:gh47757, r=Mark-Simulacrum
Centril Jan 12, 2019
52e02fc
Rollup merge of #57505 - rust-lang:nrc-patch-1, r=alexcrichton
Centril Jan 12, 2019
1f66062
Rollup merge of #57510 - nrc:manifest-profiles, r=alexcrichton
Centril Jan 12, 2019
bcbf73f
Rollup merge of #57511 - jethrogb:jb/fix-undef, r=cramertj
Centril Jan 12, 2019
7da604e
Rollup merge of #57519 - pthariensflame:patch-2, r=alexcrichton
Centril Jan 12, 2019
e234d15
Rollup merge of #57522 - euclio:format-ice, r=varkor
Centril Jan 12, 2019
0a8b5b4
Rollup merge of #57530 - insideoutclub:master, r=estebank
Centril Jan 12, 2019
3117784
Rollup merge of #57535 - varkor:stabilise-if-while-let-patterns, r=Ce…
Centril Jan 12, 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
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ Read ["Installation"] from [The Book].
3. Build and install:

```sh
$ git submodule update --init --recursive --progress
$ ./x.py build && sudo ./x.py install
```

Expand Down
24 changes: 24 additions & 0 deletions RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,12 @@ Stabilized APIs
- [`i64::from_be_bytes`]
- [`i64::from_le_bytes`]
- [`i64::from_ne_bytes`]
- [`i128::to_be_bytes`]
- [`i128::to_le_bytes`]
- [`i128::to_ne_bytes`]
- [`i128::from_be_bytes`]
- [`i128::from_le_bytes`]
- [`i128::from_ne_bytes`]
- [`isize::to_be_bytes`]
- [`isize::to_le_bytes`]
- [`isize::to_ne_bytes`]
Expand Down Expand Up @@ -151,6 +157,12 @@ Stabilized APIs
- [`u64::from_be_bytes`]
- [`u64::from_le_bytes`]
- [`u64::from_ne_bytes`]
- [`u128::to_be_bytes`]
- [`u128::to_le_bytes`]
- [`u128::to_ne_bytes`]
- [`u128::from_be_bytes`]
- [`u128::from_le_bytes`]
- [`u128::from_ne_bytes`]
- [`usize::to_be_bytes`]
- [`usize::to_le_bytes`]
- [`usize::to_ne_bytes`]
Expand Down Expand Up @@ -208,6 +220,12 @@ Compatibility Notes
[`UnsafeCell::get`]: https://doc.rust-lang.org/std/cell/struct.UnsafeCell.html#method.get
[`slice::as_ptr`]: https://doc.rust-lang.org/std/primitive.slice.html#method.as_ptr
[`char::is_ascii`]: https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii
[`i128::from_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i128.html#method.from_be_bytes
[`i128::from_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i128.html#method.from_le_bytes
[`i128::from_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i128.html#method.from_ne_bytes
[`i128::to_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i128.html#method.to_be_bytes
[`i128::to_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i128.html#method.to_le_bytes
[`i128::to_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i128.html#method.to_ne_bytes
[`i16::from_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i16.html#method.from_be_bytes
[`i16::from_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i16.html#method.from_le_bytes
[`i16::from_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i16.html#method.from_ne_bytes
Expand Down Expand Up @@ -240,6 +258,12 @@ Compatibility Notes
[`isize::to_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.isize.html#method.to_ne_bytes
[`iter::empty`]: https://doc.rust-lang.org/std/iter/fn.empty.html
[`str::as_ptr`]: https://doc.rust-lang.org/std/primitive.str.html#method.as_ptr
[`u128::from_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u128.html#method.from_be_bytes
[`u128::from_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u128.html#method.from_le_bytes
[`u128::from_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u128.html#method.from_ne_bytes
[`u128::to_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u128.html#method.to_be_bytes
[`u128::to_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u128.html#method.to_le_bytes
[`u128::to_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u128.html#method.to_ne_bytes
[`u16::from_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u16.html#method.from_be_bytes
[`u16::from_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u16.html#method.from_le_bytes
[`u16::from_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u16.html#method.from_ne_bytes
Expand Down
2 changes: 1 addition & 1 deletion config.toml.example
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@
#codegen-units-std = 1

# Whether or not debug assertions are enabled for the compiler and standard
# library. Also enables compilation of debug! and trace! logging macros.
# library.
#debug-assertions = false

# Whether or not debuginfo is emitted
Expand Down
14 changes: 6 additions & 8 deletions src/bootstrap/native.rs
Original file line number Diff line number Diff line change
Expand Up @@ -346,15 +346,13 @@ fn configure_cmake(builder: &Builder,
if builder.config.llvm_clang_cl.is_some() && target.contains("i686") {
cfg.env("SCCACHE_EXTRA_ARGS", "-m32");
}

// If ccache is configured we inform the build a little differently how
// to invoke ccache while also invoking our compilers.
} else if let Some(ref ccache) = builder.config.ccache {
cfg.define("CMAKE_C_COMPILER", ccache)
.define("CMAKE_C_COMPILER_ARG1", sanitize_cc(cc))
.define("CMAKE_CXX_COMPILER", ccache)
.define("CMAKE_CXX_COMPILER_ARG1", sanitize_cc(cxx));
} else {
// If ccache is configured we inform the build a little differently how
// to invoke ccache while also invoking our compilers.
if let Some(ref ccache) = builder.config.ccache {
cfg.define("CMAKE_C_COMPILER_LAUNCHER", ccache)
.define("CMAKE_CXX_COMPILER_LAUNCHER", ccache);
}
cfg.define("CMAKE_C_COMPILER", sanitize_cc(cc))
.define("CMAKE_CXX_COMPILER", sanitize_cc(cxx));
}
Expand Down

This file was deleted.

89 changes: 62 additions & 27 deletions src/liballoc/vec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -738,53 +738,88 @@ impl<T> Vec<T> {
self
}

/// Sets the length of a vector.
/// Forces the length of the vector to `new_len`.
///
/// This will explicitly set the size of the vector, without actually
/// modifying its buffers, so it is up to the caller to ensure that the
/// vector is actually the specified size.
/// This is a low-level operation that maintains none of the normal
/// invariants of the type. Normally changing the length of a vector
/// is done using one of the safe operations instead, such as
/// [`truncate`], [`resize`], [`extend`], or [`clear`].
///
/// # Examples
/// [`truncate`]: #method.truncate
/// [`resize`]: #method.resize
/// [`extend`]: #method.extend-1
/// [`clear`]: #method.clear
///
/// ```
/// use std::ptr;
/// # Safety
///
/// let mut vec = vec!['r', 'u', 's', 't'];
/// - `new_len` must be less than or equal to [`capacity()`].
/// - The elements at `old_len..new_len` must be initialized.
///
/// unsafe {
/// ptr::drop_in_place(&mut vec[3]);
/// vec.set_len(3);
/// [`capacity()`]: #method.capacity
///
/// # Examples
///
/// This method can be useful for situations in which the vector
/// is serving as a buffer for other code, particularly over FFI:
///
/// ```no_run
/// # #![allow(dead_code)]
/// # // This is just a minimal skeleton for the doc example;
/// # // don't use this as a starting point for a real library.
/// # pub struct StreamWrapper { strm: *mut std::ffi::c_void }
/// # const Z_OK: i32 = 0;
/// # extern "C" {
/// # fn deflateGetDictionary(
/// # strm: *mut std::ffi::c_void,
/// # dictionary: *mut u8,
/// # dictLength: *mut usize,
/// # ) -> i32;
/// # }
/// # impl StreamWrapper {
/// pub fn get_dictionary(&self) -> Option<Vec<u8>> {
/// // Per the FFI method's docs, "32768 bytes is always enough".
/// let mut dict = Vec::with_capacity(32_768);
/// let mut dict_length = 0;
/// // SAFETY: When `deflateGetDictionary` returns `Z_OK`, it holds that:
/// // 1. `dict_length` elements were initialized.
/// // 2. `dict_length` <= the capacity (32_768)
/// // which makes `set_len` safe to call.
/// unsafe {
/// // Make the FFI call...
/// let r = deflateGetDictionary(self.strm, dict.as_mut_ptr(), &mut dict_length);
/// if r == Z_OK {
/// // ...and update the length to what was initialized.
/// dict.set_len(dict_length);
/// Some(dict)
/// } else {
/// None
/// }
/// }
/// }
/// assert_eq!(vec, ['r', 'u', 's']);
/// # }
/// ```
///
/// In this example, there is a memory leak since the memory locations
/// owned by the inner vectors were not freed prior to the `set_len` call:
/// While the following example is sound, there is a memory leak since
/// the inner vectors were not freed prior to the `set_len` call:
///
/// ```
/// let mut vec = vec![vec![1, 0, 0],
/// vec![0, 1, 0],
/// vec![0, 0, 1]];
/// // SAFETY:
/// // 1. `old_len..0` is empty so no elements need to be initialized.
/// // 2. `0 <= capacity` always holds whatever `capacity` is.
/// unsafe {
/// vec.set_len(0);
/// }
/// ```
///
/// In this example, the vector gets expanded from zero to four items
/// without any memory allocations occurring, resulting in vector
/// values of unallocated memory:
///
/// ```
/// let mut vec: Vec<char> = Vec::new();
///
/// unsafe {
/// vec.set_len(4);
/// }
/// ```
/// Normally, here, one would use [`clear`] instead to correctly drop
/// the contents and thus not leak memory.
#[inline]
#[stable(feature = "rust1", since = "1.0.0")]
pub unsafe fn set_len(&mut self, len: usize) {
self.len = len;
pub unsafe fn set_len(&mut self, new_len: usize) {
self.len = new_len;
}

/// Removes an element from the vector and returns it.
Expand Down
1 change: 1 addition & 0 deletions src/libcore/ptr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -849,6 +849,7 @@ pub unsafe fn write_unaligned<T>(dst: *mut T, src: T) {
/// [valid]: ../ptr/index.html#safety
/// [`Copy`]: ../marker/trait.Copy.html
/// [`read`]: ./fn.read.html
/// [read-ownership]: ./fn.read.html#ownership-of-the-returned-value
///
/// Just like in C, whether an operation is volatile has no bearing whatsoever
/// on questions involving concurrent access from multiple threads. Volatile
Expand Down
8 changes: 6 additions & 2 deletions src/libcore/str/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ pub mod pattern;
#[allow(missing_docs)]
pub mod lossy;

/// A trait to abstract the idea of creating a new instance of a type from a
/// string.
/// Parse a value from a string
///
/// `FromStr`'s [`from_str`] method is often used implicitly, through
/// [`str`]'s [`parse`] method. See [`parse`]'s documentation for examples.
Expand All @@ -30,6 +29,11 @@ pub mod lossy;
/// [`str`]: ../../std/primitive.str.html
/// [`parse`]: ../../std/primitive.str.html#method.parse
///
/// `FromStr` does not have a lifetime parameter, and so you can only parse types
/// that do not contain a lifetime parameter themselves. In other words, you can
/// parse an `i32` with `FromStr`, but not a `&i32`. You can parse a struct that
/// contains an `i32`, but not one that contains an `&i32`.
///
/// # Examples
///
/// Basic implementation of `FromStr` on an example `Point` type:
Expand Down
4 changes: 0 additions & 4 deletions src/librustc/hir/def_id.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ pub enum CrateNum {
// FIXME(jseyfried): this is also used for custom derives until proc-macro crates get
// `CrateNum`s.
BuiltinMacros,
/// A CrateNum value that indicates that something is wrong.
Invalid,
/// A special CrateNum that we use for the tcx.rcache when decoding from
/// the incr. comp. cache.
ReservedForIncrCompCache,
Expand All @@ -29,7 +27,6 @@ impl ::std::fmt::Debug for CrateNum {
fn fmt(&self, fmt: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match self {
CrateNum::Index(id) => write!(fmt, "crate{}", id.private),
CrateNum::Invalid => write!(fmt, "invalid crate"),
CrateNum::BuiltinMacros => write!(fmt, "builtin macros crate"),
CrateNum::ReservedForIncrCompCache => write!(fmt, "crate for decoding incr comp cache"),
}
Expand Down Expand Up @@ -90,7 +87,6 @@ impl fmt::Display for CrateNum {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
match self {
CrateNum::Index(id) => fmt::Display::fmt(&id.private, f),
CrateNum::Invalid => write!(f, "invalid crate"),
CrateNum::BuiltinMacros => write!(f, "builtin macros crate"),
CrateNum::ReservedForIncrCompCache => write!(f, "crate for decoding incr comp cache"),
}
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/lint/builtin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ declare_lint! {

declare_lint! {
pub IRREFUTABLE_LET_PATTERNS,
Deny,
Warn,
"detects irrefutable patterns in if-let and while-let statements"
}

Expand Down
10 changes: 10 additions & 0 deletions src/librustc/ty/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,12 @@ pub struct TypeckTables<'tcx> {
/// All the existential types that are restricted to concrete types
/// by this function
pub concrete_existential_types: FxHashMap<DefId, Ty<'tcx>>,

/// Given the closure ID this map provides the list of UpvarIDs used by it.
/// The upvarID contains the HIR node ID and it also contains the full path
/// leading to the member of the struct or tuple that is used instead of the
/// entire variable.
pub upvar_list: ty::UpvarListMap,
}

impl<'tcx> TypeckTables<'tcx> {
Expand All @@ -441,6 +447,7 @@ impl<'tcx> TypeckTables<'tcx> {
tainted_by_errors: false,
free_region_map: Default::default(),
concrete_existential_types: Default::default(),
upvar_list: Default::default(),
}
}

Expand Down Expand Up @@ -741,6 +748,8 @@ impl<'a, 'gcx> HashStable<StableHashingContext<'a>> for TypeckTables<'gcx> {
tainted_by_errors,
ref free_region_map,
ref concrete_existential_types,
ref upvar_list,

} = *self;

hcx.with_node_id_hashing_mode(NodeIdHashingMode::HashDefPath, |hcx| {
Expand Down Expand Up @@ -783,6 +792,7 @@ impl<'a, 'gcx> HashStable<StableHashingContext<'a>> for TypeckTables<'gcx> {
tainted_by_errors.hash_stable(hcx, hasher);
free_region_map.hash_stable(hcx, hasher);
concrete_existential_types.hash_stable(hcx, hasher);
upvar_list.hash_stable(hcx, hasher);
})
}
}
Expand Down
6 changes: 5 additions & 1 deletion src/librustc/ty/layout.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1842,7 +1842,11 @@ impl<'a, 'tcx> LayoutCx<'tcx, TyCtxt<'a, 'tcx, 'tcx>> {
return Ok(None);
}
}
if let FieldPlacement::Array { .. } = layout.fields {
if let FieldPlacement::Array { count: original_64_bit_count, .. } = layout.fields {
// rust-lang/rust#57038: avoid ICE within FieldPlacement::count when count too big
if original_64_bit_count > usize::max_value() as u64 {
return Err(LayoutError::SizeOverflow(layout.ty));
}
if layout.fields.count() > 0 {
return self.find_niche(layout.field(self, 0)?);
} else {
Expand Down
1 change: 1 addition & 0 deletions src/librustc/ty/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -808,6 +808,7 @@ pub struct UpvarBorrow<'tcx> {
pub region: ty::Region<'tcx>,
}

pub type UpvarListMap = FxHashMap<DefId, Vec<UpvarId>>;
pub type UpvarCaptureMap<'tcx> = FxHashMap<UpvarId, UpvarCapture<'tcx>>;

#[derive(Copy, Clone)]
Expand Down
Loading