]> git.lizzy.rs Git - rust.git/log
rust.git
6 years agoRename TokenStream::empty to TokenStream::new
David Tolnay [Sat, 26 May 2018 02:44:07 +0000 (19:44 -0700)]
Rename TokenStream::empty to TokenStream::new

There is no precedent for the `empty` name -- we do not have
`Vec::empty` or `HashMap::empty` etc.

6 years agoAuto merge of #51033 - coryshrmn:master, r=dtolnay
bors [Fri, 25 May 2018 22:18:27 +0000 (22:18 +0000)]
Auto merge of #51033 - coryshrmn:master, r=dtolnay

stabilize RangeBounds collections_range #30877

The FCP for #30877 closed last month, with the decision to:
1. move from `collections::range::RangeArgument` to `ops::RangeBounds`, and
2. rename `start()` and `end()` to `start_bounds()` and `end_bounds()`.

Simon Sapin already moved it to `ops::RangeBounds` in #49163.

I renamed the functions, and removed the old `collections::range::RangeArgument` alias.

This is my first Rust PR, please let me know if I can improve anything. This passes all tests for me, except the `clippy` tool (which uses `RangeArgument::start()`).

I considered deprecating `start()` and `end()` instead of removing them, but the contribution guidelines indicate we can break `clippy` temporarily. I thought it was best to remove the functions, since we're worried about name collisions with `Range::start` and `end`.

Closes #30877.

6 years agoAuto merge of #50967 - oli-obk:miri_api_refactor, r=eddyb
bors [Fri, 25 May 2018 13:59:48 +0000 (13:59 +0000)]
Auto merge of #50967 - oli-obk:miri_api_refactor, r=eddyb

Miri api refactor

r? @eddyb

cc @Zoxc

based on https://github.com/rust-lang/rust/pull/50916

6 years agoAdjust test for 32 bit targets
Oliver Schneider [Fri, 25 May 2018 13:13:54 +0000 (15:13 +0200)]
Adjust test for 32 bit targets

6 years agoSanity abort `to_bits` if used on zsts
Oliver Schneider [Fri, 25 May 2018 09:56:33 +0000 (11:56 +0200)]
Sanity abort `to_bits` if used on zsts

6 years agoAuto merge of #51051 - nikomatsakis:turbofish-impl-trait-method, r=eddyb
bors [Fri, 25 May 2018 09:01:11 +0000 (09:01 +0000)]
Auto merge of #51051 - nikomatsakis:turbofish-impl-trait-method, r=eddyb

prohibit turbofish in `impl Trait` methods

Fix #50950

6 years agoUpdate comment
Oliver Schneider [Fri, 25 May 2018 08:18:57 +0000 (10:18 +0200)]
Update comment

6 years agoAuto merge of #50998 - bobtwinkles:nll_facts_invalidate_followup, r=nikomatsakis
bors [Fri, 25 May 2018 06:26:26 +0000 (06:26 +0000)]
Auto merge of #50998 - bobtwinkles:nll_facts_invalidate_followup, r=nikomatsakis

NLL facts invalidate followup

Refactors to share code with the rest of borrow-check.

r? @nikomatsakis

6 years agoAuto merge of #50986 - estebank:main-start-span, r=nikomatsakis
bors [Fri, 25 May 2018 03:46:14 +0000 (03:46 +0000)]
Auto merge of #50986 - estebank:main-start-span, r=nikomatsakis

Tweak `main` type arguments and where clause spans

Tweak the spans for error when finding type arguments or where clauses
in main and start functions.

6 years agoAuto merge of #50879 - petrochenkov:lintconv, r=nikomatsakis
bors [Fri, 25 May 2018 01:33:45 +0000 (01:33 +0000)]
Auto merge of #50879 - petrochenkov:lintconv, r=nikomatsakis

Fix naming conventions for new lints

We actually have an RFC from Oct 2014 specifying naming conventions for lints that is still relevant - https://github.com/rust-lang/rfcs/blob/master/text/0344-conventions-galore.md#lints.
Unfortunately, human memory doesn't work for such prolonged periods of time, so a number of recently added edition-related lints don't follow the conventions.
This PR fixes names for those lints.

Unstable lints, simply renamed:
- `unused_lifetime` -> `unused_lifetimes`
- `absolute_path_not_starting_with_crate` -> `absolute_paths_not_starting_with_crate`
- `unnecessary_extern_crate` -> `unnecessary_extern_crates`

New lints stabilized in the last couple of releases, registered as renamed (old names still work with a warning):
- `single_use_lifetime` -> `single_use_lifetimes`
- `elided_lifetime_in_path` -> `elided_lifetimes_in_paths`
- `bare_trait_object` -> `bare_trait_objects`
- `unstable_name_collision` -> `unstable_name_collisions`
- `unused_doc_comment` -> `unused_doc_comments`

NOT changed, too old to rename:
- `const_err` -> `const_errors`
- `unused_allocation` -> `unused_allocations`

NOT changed, deprecation lints, no need to rename, they are going to be removed anyway:
- `invalid_type_param_default` -> `invalid_type_param_defaults`
- `missing_fragment_specifier` -> `missing_fragment_specifiers`
- `tyvar_behind_raw_pointer` -> `tyvars_behind_raw_pointer`
- `illegal_floating_point_literal_pattern` -> `illegal_floating_point_literal_patterns`

6 years agoFix naming conventions for new lints
Vadim Petrochenkov [Fri, 18 May 2018 22:13:53 +0000 (01:13 +0300)]
Fix naming conventions for new lints

6 years agoAuto merge of #50937 - nikomatsakis:chalkify-engine-2, r=scalexm
bors [Thu, 24 May 2018 23:10:18 +0000 (23:10 +0000)]
Auto merge of #50937 - nikomatsakis:chalkify-engine-2, r=scalexm

implement the chalk-engine traits

Preliminary implementation for the Chalk traits in rustc. Lots of `panic!()` placeholders to be filled in later.

This is currently blocked on us landing https://github.com/rust-lang-nursery/chalk/pull/131  in chalk and issuing a new release, which should occur later today.

r? @scalexm
cc @leodasvacas

6 years agoprohibit turbofish in `impl Trait` methods
Niko Matsakis [Thu, 24 May 2018 21:34:23 +0000 (17:34 -0400)]
prohibit turbofish in `impl Trait` methods

6 years agoAuto merge of #50984 - cramertj:unpin-changes, r=aturon
bors [Thu, 24 May 2018 20:58:12 +0000 (20:58 +0000)]
Auto merge of #50984 - cramertj:unpin-changes, r=aturon

Unpin changes

r? @aturon

cc @withoutboats, @RalfJung, @pythonesque, #49150

6 years agoRevert "Ensure llvm doesn't trigger an assert for crazy transmutes"
Oliver Schneider [Thu, 24 May 2018 14:19:55 +0000 (16:19 +0200)]
Revert "Ensure llvm doesn't trigger an assert for crazy transmutes"

This reverts commit 776c632e2a9a044fd134321a9d561e28994ff3ff.

6 years agoRename `amt` variables to `shift`
Oliver Schneider [Thu, 24 May 2018 12:20:45 +0000 (14:20 +0200)]
Rename `amt` variables to `shift`

6 years agoUse in-band-lifetimes instead of unused explicit lifetimes
Oliver Schneider [Thu, 24 May 2018 12:11:56 +0000 (14:11 +0200)]
Use in-band-lifetimes instead of unused explicit lifetimes

6 years agoPrefer `to_value_with_len` over manual expanison of it
Oliver Schneider [Thu, 24 May 2018 12:10:13 +0000 (14:10 +0200)]
Prefer `to_value_with_len` over manual expanison of it

6 years agoRemove dead code
Oliver Schneider [Thu, 24 May 2018 12:06:06 +0000 (14:06 +0200)]
Remove dead code

6 years agoAdd missing newlines
Oliver Schneider [Thu, 24 May 2018 12:05:57 +0000 (14:05 +0200)]
Add missing newlines

6 years ago`tcx.lift_to_global` > `tcx.global_tcx().lift`
Oliver Schneider [Thu, 24 May 2018 09:30:24 +0000 (11:30 +0200)]
`tcx.lift_to_global` > `tcx.global_tcx().lift`

6 years agoWrongly named a closure `clamp` when it was doing truncation
Oliver Schneider [Thu, 24 May 2018 09:28:35 +0000 (11:28 +0200)]
Wrongly named a closure `clamp` when it was doing truncation

6 years agoSanity check the `bits` argument to the `from_bits` function
Oliver Schneider [Thu, 24 May 2018 09:26:42 +0000 (11:26 +0200)]
Sanity check the `bits` argument to the `from_bits` function

6 years agoRemove `ty_to_primitive`
Oliver Schneider [Thu, 24 May 2018 09:21:23 +0000 (11:21 +0200)]
Remove `ty_to_primitive`

6 years agoProperly check defined bits range
Oliver Schneider [Thu, 24 May 2018 09:12:33 +0000 (11:12 +0200)]
Properly check defined bits range

6 years agoReuse `to_bits` instead of badly reinventing it
Oliver Schneider [Thu, 24 May 2018 09:10:42 +0000 (11:10 +0200)]
Reuse `to_bits` instead of badly reinventing it

6 years agoOnly defined bits are relevant
Oliver Schneider [Thu, 24 May 2018 09:06:08 +0000 (11:06 +0200)]
Only defined bits are relevant

6 years agoDon't ICE on horrible transmutes in pattern constants
Oliver Schneider [Thu, 24 May 2018 09:03:33 +0000 (11:03 +0200)]
Don't ICE on horrible transmutes in pattern constants

6 years agoSimplify a ScalarPair creation
Oliver Schneider [Thu, 24 May 2018 08:50:05 +0000 (10:50 +0200)]
Simplify a ScalarPair creation

6 years agoEnsure llvm doesn't trigger an assert for crazy transmutes
Oliver Schneider [Thu, 24 May 2018 08:45:05 +0000 (10:45 +0200)]
Ensure llvm doesn't trigger an assert for crazy transmutes

6 years agoPrinting a fn definition needs to know nothing about its ZST's value
Oliver Schneider [Thu, 24 May 2018 08:20:06 +0000 (10:20 +0200)]
Printing a fn definition needs to know nothing about its ZST's value

6 years agoPrinting values should ignore whether bits are undefined
Oliver Schneider [Thu, 24 May 2018 08:18:54 +0000 (10:18 +0200)]
Printing values should ignore whether bits are undefined

6 years agoBetter variable naming
Oliver Schneider [Thu, 24 May 2018 08:11:24 +0000 (10:11 +0200)]
Better variable naming

6 years agoRemove the last mention of `Undef`
Oliver Schneider [Thu, 24 May 2018 08:09:52 +0000 (10:09 +0200)]
Remove the last mention of `Undef`

6 years agoReplace `ScalarKind` with `Primitive`
Oliver Schneider [Wed, 23 May 2018 17:39:49 +0000 (19:39 +0200)]
Replace `ScalarKind` with `Primitive`

6 years agoGet rid of `scalar_size`
Oliver Schneider [Wed, 23 May 2018 15:45:50 +0000 (17:45 +0200)]
Get rid of `scalar_size`

6 years agoRemove an instance of `scalar_size` in a `Debug` impl
Oliver Schneider [Tue, 22 May 2018 19:08:33 +0000 (21:08 +0200)]
Remove an instance of `scalar_size` in a `Debug` impl

6 years agoUpdate outdated comment
Oliver Schneider [Tue, 22 May 2018 17:31:21 +0000 (19:31 +0200)]
Update outdated comment

6 years agoprimval -> scalar rename
Oliver Schneider [Tue, 22 May 2018 17:30:16 +0000 (19:30 +0200)]
primval -> scalar rename

6 years agoUse the destination type size instead of the source type size
Oliver Schneider [Tue, 22 May 2018 14:18:43 +0000 (16:18 +0200)]
Use the destination type size instead of the source type size

6 years agoFormatting nit
Oliver Schneider [Tue, 22 May 2018 14:18:10 +0000 (16:18 +0200)]
Formatting nit

6 years agoRebase fallout
Oliver Schneider [Tue, 22 May 2018 14:18:00 +0000 (16:18 +0200)]
Rebase fallout

6 years agoAccidentally used byte-size instead of bit-size
Oliver Schneider [Tue, 22 May 2018 14:17:19 +0000 (16:17 +0200)]
Accidentally used byte-size instead of bit-size

6 years agoUse the target types bitsize instead of the source type's
Oliver Schneider [Tue, 22 May 2018 13:19:55 +0000 (15:19 +0200)]
Use the target types bitsize instead of the source type's

6 years agoFloats are scalars!
Oliver Schneider [Tue, 22 May 2018 12:19:19 +0000 (14:19 +0200)]
Floats are scalars!

6 years agochange `Value::Bytes` to `Value::Bits`
Oliver Schneider [Tue, 22 May 2018 08:28:46 +0000 (10:28 +0200)]
change `Value::Bytes` to `Value::Bits`

6 years agoRemove Pointer::zero in favor of Pointer::from
Oliver Schneider [Sun, 20 May 2018 22:46:06 +0000 (00:46 +0200)]
Remove Pointer::zero in favor of Pointer::from

6 years agoRename MemoryPointer to Pointer
Oliver Schneider [Sun, 20 May 2018 22:37:44 +0000 (00:37 +0200)]
Rename MemoryPointer to Pointer

6 years agoEliminate the `Pointer` wrapper type
Oliver Schneider [Sun, 20 May 2018 22:30:00 +0000 (00:30 +0200)]
Eliminate the `Pointer` wrapper type

6 years agoDifferentiate between interpret::Scalar and layout::Scalar
Oliver Schneider [Sun, 20 May 2018 22:00:38 +0000 (00:00 +0200)]
Differentiate between interpret::Scalar and layout::Scalar

6 years agoRename ByVal(Pair) to Scalar(Pair)
Oliver Schneider [Sun, 20 May 2018 21:46:30 +0000 (23:46 +0200)]
Rename ByVal(Pair) to Scalar(Pair)

6 years agoRename PrimVal to Scalar
Oliver Schneider [Sun, 20 May 2018 21:43:16 +0000 (23:43 +0200)]
Rename PrimVal to Scalar

6 years agoAdd constant for `Size::from_bytes(0)`
Oliver Schneider [Sun, 20 May 2018 12:14:39 +0000 (14:14 +0200)]
Add constant for `Size::from_bytes(0)`

6 years agoAuto merge of #50909 - oli-obk:unstable_const_fn_promotion, r=eddyb
bors [Thu, 24 May 2018 16:43:22 +0000 (16:43 +0000)]
Auto merge of #50909 - oli-obk:unstable_const_fn_promotion, r=eddyb

Enforce stability of const fn in promoteds

r? @eddyb

fixes #50901

what's going on here? Why do we have two promoted computation algorithms?

6 years agopacify the mercilous tidy
Niko Matsakis [Thu, 24 May 2018 13:51:57 +0000 (09:51 -0400)]
pacify the mercilous tidy

6 years agoextend the crate whitelist to include rustc-hash, chalk
Niko Matsakis [Thu, 24 May 2018 13:51:38 +0000 (09:51 -0400)]
extend the crate whitelist to include rustc-hash, chalk

6 years agoget `rustc_hash` from external crate
Niko Matsakis [Thu, 24 May 2018 12:48:02 +0000 (08:48 -0400)]
get `rustc_hash` from external crate

6 years agoimplement the chalk traits, albeit with many placeholders
Niko Matsakis [Tue, 8 May 2018 21:15:48 +0000 (18:15 -0300)]
implement the chalk traits, albeit with many placeholders

6 years agoAlways mark unstable const fn as not const
Oliver Schneider [Sun, 20 May 2018 21:18:41 +0000 (23:18 +0200)]
Always mark unstable const fn as not const

6 years agoEnforce stability of const fn in promoteds
Oliver Schneider [Sun, 20 May 2018 00:19:20 +0000 (02:19 +0200)]
Enforce stability of const fn in promoteds

6 years agoAuto merge of #50930 - toidiu:ak-ordOutlivesPredicate, r=nikomatsakis
bors [Thu, 24 May 2018 14:30:58 +0000 (14:30 +0000)]
Auto merge of #50930 - toidiu:ak-ordOutlivesPredicate, r=nikomatsakis

implement Ord for OutlivesPredicate and other types

It became necessary while implementing https://github.com/rust-lang/rust/pull/50070 to have `Ord` implemented for `OutlivesPredicate`.

This PR implements `Ord` for `OutlivesPredicate` as well as other types needed for the implementation.

6 years agoAuto merge of #51023 - kennytm:rollup, r=kennytm
bors [Thu, 24 May 2018 12:05:47 +0000 (12:05 +0000)]
Auto merge of #51023 - kennytm:rollup, r=kennytm

Rollup of 9 pull requests

Successful merges:

 - #50864 (Add NetBSD/arm target specs)
 - #50956 (rust-gdb: work around the re-used -d argument in cgdb)
 - #50964 (Make sure that queries have predictable symbol names.)
 - #50965 (Update LLVM to pull in another wasm fix)
 - #50972 (Add -Z no-parallel-llvm flag)
 - #50979 (Fix span for type-only arguments)
 - #50981 (Shrink `LiveNode`.)
 - #50995 (move type out of unsafe block)
 - #51011 ( rustdoc: hide macro export statements from docs)

Failed merges:

6 years agoremove collections::range::RangeArgument
Cory Sherman [Thu, 24 May 2018 11:47:29 +0000 (04:47 -0700)]
remove collections::range::RangeArgument

was already moved to ops::RangeBounds (see #30877)

6 years agostabilize RangeBounds collections_range #30877
Cory Sherman [Thu, 24 May 2018 11:39:35 +0000 (04:39 -0700)]
stabilize RangeBounds collections_range #30877

rename RangeBounds::start() -> start_bound()
rename RangeBounds::end() -> end_bound()

6 years agoRollup merge of #51011 - QuietMisdreavus:duplicitous-macros, r=ollie27
kennytm [Thu, 24 May 2018 08:02:47 +0000 (16:02 +0800)]
Rollup merge of #51011 - QuietMisdreavus:duplicitous-macros, r=ollie27

 rustdoc: hide macro export statements from docs

As mentioned in https://github.com/rust-lang/rust/issues/50647, rustdoc now prints both the import statement and the macro itself when re-exporting macros. This is a stopgap solution to clean up the std docs and get something small backported into beta.

What this does: When rustdoc finds an export statement for a macro, instead of printing the export and bailing, now it will instead hide the export and bail. Until we can solve https://github.com/rust-lang/rust/issues/34843 or have a better way to find the attributes on an export statement when inlining macros, this will at least match the current behavior and clean up the re-export statements from the docs.

6 years agoRollup merge of #50995 - fbstj:patch-1, r=cramertj
kennytm [Thu, 24 May 2018 08:02:46 +0000 (16:02 +0800)]
Rollup merge of #50995 - fbstj:patch-1, r=cramertj

move type out of unsafe block

from https://github.com/rust-lang/rust/pull/50863#discussion_r190213000

move the union definition outside of the unsafe block as it's definition is not unsafe

6 years agoAuto merge of #50949 - eddyb:debuginfo, r=mw
bors [Thu, 24 May 2018 09:27:15 +0000 (09:27 +0000)]
Auto merge of #50949 - eddyb:debuginfo, r=mw

rustc_codegen_llvm: remove some debuginfo cruft.

(The second commit passes tests locally but might not on older LLVM versions)

r? @nikomatsakis

6 years agoRollup merge of #50981 - nnethercote:shrink-LiveNode, r=nikomatsakis
kennytm [Thu, 24 May 2018 08:02:44 +0000 (16:02 +0800)]
Rollup merge of #50981 - nnethercote:shrink-LiveNode, r=nikomatsakis

Shrink `LiveNode`.

`Liveness::users` is a vector that is occasionally enormous. For
example, doing a "clean incremental" check build of `inflate`, there is
one instance that represents 5,499 live nodes and 1087 vars, which
requires 5,977,413 entries. At 24 bytes per entry, that is 143MB.

This patch changes LiveNode from a usize to a u32. On 64-bit machines
that halves the size of these entries, significantly reducing peak
memory usage and memory traffic, and speeding up "clean incremental"
builds of `inflate` by about 10%.

6 years agoRollup merge of #50979 - Manishearth:type-only, r=estebank
kennytm [Thu, 24 May 2018 08:02:42 +0000 (16:02 +0800)]
Rollup merge of #50979 - Manishearth:type-only, r=estebank

Fix span for type-only arguments

Currently it points to the comma or parenthesis before the type, which is broken

cc @mark-i-m this is what broke #48309

r? @estebank

6 years agoRollup merge of #50972 - nikic:no-parallel, r=michaelwoerister
kennytm [Thu, 24 May 2018 08:02:41 +0000 (16:02 +0800)]
Rollup merge of #50972 - nikic:no-parallel, r=michaelwoerister

Add -Z no-parallel-llvm flag

Codegen issues commonly only manifest under specific circumstances,
e.g. if multiple codegen units are used and ThinLTO is enabled.
However, these configuration are threaded, making the use of LLVM
debugging facilities hard, as output is interleaved.

This patch adds a -Z no-parallel-llvm flag, which allows disabling
parallelization of codegen and linking, while otherwise preserving
behavior with regard to codegen units and LTO.

6 years agoRollup merge of #50965 - alexcrichton:update-llvm, r=TimNN
kennytm [Thu, 24 May 2018 08:02:40 +0000 (16:02 +0800)]
Rollup merge of #50965 - alexcrichton:update-llvm, r=TimNN

Update LLVM to pull in another wasm fix

Closes #50869

6 years agoRollup merge of #50964 - michaelwoerister:query-symbol-names, r=nikomatsakis
kennytm [Thu, 24 May 2018 08:02:39 +0000 (16:02 +0800)]
Rollup merge of #50964 - michaelwoerister:query-symbol-names, r=nikomatsakis

Make sure that queries have predictable symbol names.

Some recent refactorings led to query names not showing up in the corresponding symbol names. [perf-focus](https://github.com/nikomatsakis/perf-focus) and manual profiling have been broken by this. This PR makes sure that query providers always get their own symbol and that that symbol has a predictable name.

Since this adds `#[inline(never)]` to a function that wraps the provider call, let's check if this does not regress performance before merging.

r? @nikomatsakis

6 years agoRollup merge of #50956 - atopia:rust-gdb-with-cdgb, r=nikomatsakis
kennytm [Thu, 24 May 2018 08:02:38 +0000 (16:02 +0800)]
Rollup merge of #50956 - atopia:rust-gdb-with-cdgb, r=nikomatsakis

rust-gdb: work around the re-used -d argument in cgdb

Use --directory= to pass $GDB_PYTHON_MODULE_DIRECTORY instead of -d, because [cgdb](https://github.com/cgdb/cgdb) reuses '-d' to select a debugger, whereas the long option works with both gdb and cgdb.

6 years agoRollup merge of #50864 - jakllsch:add-netbsd-arm-target-specs, r=alexcrichton
kennytm [Thu, 24 May 2018 08:02:37 +0000 (16:02 +0800)]
Rollup merge of #50864 - jakllsch:add-netbsd-arm-target-specs, r=alexcrichton

Add NetBSD/arm target specs

6 years agoAuto merge of #50971 - alexcrichton:no-stringify, r=petrochenkov
bors [Thu, 24 May 2018 07:14:21 +0000 (07:14 +0000)]
Auto merge of #50971 - alexcrichton:no-stringify, r=petrochenkov

rustc: Correctly pretty-print macro delimiters

This commit updates the `Mac_` AST structure to keep track of the delimiters
that it originally had for its invocation. This allows us to faithfully
pretty-print macro invocations not using parentheses (e.g. `vec![...]`). This in
turn helps procedural macros due to #43081.

Closes #50840

6 years agoimplement Ord for OutlivesPredicate and other types
toidiu [Thu, 17 May 2018 21:42:02 +0000 (17:42 -0400)]
implement Ord for OutlivesPredicate and other types

6 years agoAuto merge of #50943 - oli-obk:cleanups, r=estebank
bors [Thu, 24 May 2018 03:40:16 +0000 (03:40 +0000)]
Auto merge of #50943 - oli-obk:cleanups, r=estebank

impl Trait diagnostic/test cleanups

6 years agofix @!has conditions in pub-use-extern-macros test
QuietMisdreavus [Thu, 24 May 2018 01:53:45 +0000 (20:53 -0500)]
fix @!has conditions in pub-use-extern-macros test

6 years agoAuto merge of #51010 - nikomatsakis:issue-50996-renamed-extern-crate, r=acrichto
bors [Thu, 24 May 2018 01:25:40 +0000 (01:25 +0000)]
Auto merge of #51010 - nikomatsakis:issue-50996-renamed-extern-crate, r=acrichto

"crate-ify" paths that begin with a renamed crate

This does two things:

- crate-ify paths that begin with a renamed crate (i.e., add `crate::`) to the front

Fixes https://github.com/rust-lang/rust/issues/50996

I also added tests for a few other scenarios.

r? @alexcrichton

6 years agoAuto merge of #50933 - SimonSapin:anchorage, r=alexcrichton
bors [Wed, 23 May 2018 22:50:12 +0000 (22:50 +0000)]
Auto merge of #50933 - SimonSapin:anchorage, r=alexcrichton

Remove the unstable Float trait

Following up to #49896 and #50629. Fixes #32110.

6 years agoupdate "pub-use-extern-macros" test to hide the regular import statement
QuietMisdreavus [Wed, 23 May 2018 21:39:47 +0000 (16:39 -0500)]
update "pub-use-extern-macros" test to hide the regular import statement

6 years agorustdoc: hide macro export statements from docs
QuietMisdreavus [Wed, 23 May 2018 21:22:18 +0000 (16:22 -0500)]
rustdoc: hide macro export statements from docs

6 years ago"crate-ify" paths that begin with a renamed crate
Niko Matsakis [Wed, 23 May 2018 20:20:40 +0000 (16:20 -0400)]
"crate-ify" paths that begin with a renamed crate

6 years agoAuto merge of #50916 - oli-obk:miri, r=eddyb
bors [Wed, 23 May 2018 20:13:22 +0000 (20:13 +0000)]
Auto merge of #50916 - oli-obk:miri, r=eddyb

Allow `Size` to be any valid `u64`

cc https://github.com/solson/miri/pull/378#issuecomment-390470725

The alternative is to make mir::interpret's pointer offsets not be `Size`

fixes #50917

r? @eddyb

6 years agoAuto merge of #50983 - nikomatsakis:issue-50970-migration-lint-fq-path, r=alexcrichton
bors [Wed, 23 May 2018 17:36:28 +0000 (17:36 +0000)]
Auto merge of #50983 - nikomatsakis:issue-50970-migration-lint-fq-path, r=alexcrichton

Issue 50970 migration lint fq path

Similar issue, but for fully qualified paths.

Fixes #50970

r? @alexcrichton

6 years agoAuto merge of #50891 - davidtwco:nll-kill-loans-out-of-scope-at-location-reduce-calls...
bors [Wed, 23 May 2018 15:06:27 +0000 (15:06 +0000)]
Auto merge of #50891 - davidtwco:nll-kill-loans-out-of-scope-at-location-reduce-calls, r=pnkfelix

Remove extra calls to kill_loans_out_of_scope_at_location.

r? @nikomatsakis

6 years agoRemove unnecessary type annotations
bobtwinkles [Wed, 23 May 2018 14:57:21 +0000 (07:57 -0700)]
Remove unnecessary type annotations

6 years agomove type def out of unsafe block
Joe ST [Wed, 23 May 2018 14:01:11 +0000 (15:01 +0100)]
move type def out of unsafe block

from https://github.com/rust-lang/rust/pull/50863#discussion_r190213000

move the union definition outside of the unsafe block

6 years agoAuto merge of #50866 - michaelwoerister:relocations-in-vec, r=oli-obk
bors [Wed, 23 May 2018 12:24:48 +0000 (12:24 +0000)]
Auto merge of #50866 - michaelwoerister:relocations-in-vec, r=oli-obk

Use different datastructure for MIRI relocations

This PR makes relocations in MIRI used a sorted vector instead of a `BTreeMap` which should make a few common operations more efficient. Let's see if that's true.

r? @oli-obk

6 years agopacify the mercilous tidy
Niko Matsakis [Wed, 23 May 2018 12:17:04 +0000 (08:17 -0400)]
pacify the mercilous tidy

6 years agohandle fully qualified paths properly when linting
Niko Matsakis [Tue, 22 May 2018 23:01:09 +0000 (19:01 -0400)]
handle fully qualified paths properly when linting

fixes #50970

6 years agoAuto merge of #50528 - whitfin:issue-50508, r=michaelwoerister
bors [Wed, 23 May 2018 09:50:54 +0000 (09:50 +0000)]
Auto merge of #50528 - whitfin:issue-50508, r=michaelwoerister

Remove attribute_cache from CrateMetadata

This PR will fix #50508 by removing the `attribute_cache` from the `CrateMetadata` struct. Seeing as performance was referenced in the original issue, I also cleaned up a `self.entry(node_id);` call which might have occasionally happened redundantly.

r? @michaelwoerister

6 years agoAuto merge of #50798 - bobtwinkles:nll_facts_invalidate, r=nikomatsakis
bors [Wed, 23 May 2018 07:15:34 +0000 (07:15 +0000)]
Auto merge of #50798 - bobtwinkles:nll_facts_invalidate, r=nikomatsakis

Generate "invalidates" facts when -Znll-facts is passed

Most of the new code is copied directly from the heart of the MIR borrowchecker. I was expecting more fundamental structural changes, hence the copying. This appears to work as it stands, but I'd like to submit a follow-up PR to reduce code duplication. I figured that could wait though, since this is blocking a large amount of work in the borrow check repository and I'm out of time for tonight =).

r? @nikomatsakis

6 years agoAuto merge of #50682 - F001:issue-50589, r=petrochenkov
bors [Wed, 23 May 2018 05:09:13 +0000 (05:09 +0000)]
Auto merge of #50682 - F001:issue-50589, r=petrochenkov

Add lint for multiple associated types

Fix https://github.com/rust-lang/rust/issues/50589. cc @abonander

6 years agoTweak `main` type arguments and where clause spans
Esteban Küber [Wed, 23 May 2018 02:27:41 +0000 (19:27 -0700)]
Tweak `main` type arguments and where clause spans

Tweak the spans for error when finding type arguments or where clauses
in main and start functions.

6 years agoAuto merge of #50982 - alexcrichton:less-warnings, r=nikomatsakis
bors [Wed, 23 May 2018 02:44:08 +0000 (02:44 +0000)]
Auto merge of #50982 - alexcrichton:less-warnings, r=nikomatsakis

rustc: Fix another double-lint issue with `crate::`

This commit fixes another issue in the `absolute_path_not_starting_with_crate`
lint where it warns twice about an import which may contain `self`. It turns out
there were a few more locations that needed updating to use `root_id` and
`root_span` introduced in #50970 and after that it looks to work like a charm!

Closes #50978

6 years agoinverting speculative flag
F001 [Wed, 23 May 2018 00:59:08 +0000 (08:59 +0800)]
inverting speculative flag

6 years agoAdd Option::as_pin_mut
Taylor Cramer [Wed, 23 May 2018 00:07:51 +0000 (17:07 -0700)]
Add Option::as_pin_mut

6 years agoAdd PinMut::set
Taylor Cramer [Tue, 22 May 2018 23:59:53 +0000 (16:59 -0700)]
Add PinMut::set

6 years agoAdd Pinned type for opting out of Unpin on stable
Taylor Cramer [Wed, 23 May 2018 00:10:14 +0000 (17:10 -0700)]
Add Pinned type for opting out of Unpin on stable