]> git.lizzy.rs Git - rust.git/log
rust.git
8 years agorenumber diagnostic to avoid conflict
Niko Matsakis [Wed, 16 Mar 2016 20:37:19 +0000 (16:37 -0400)]
renumber diagnostic to avoid conflict

specialization nabbed E0520

8 years agoremove unused variable in compiletest
Niko Matsakis [Wed, 16 Mar 2016 19:00:34 +0000 (15:00 -0400)]
remove unused variable in compiletest

8 years agounit-test symbol-names and item-paths
Niko Matsakis [Wed, 16 Mar 2016 19:00:20 +0000 (15:00 -0400)]
unit-test symbol-names and item-paths

8 years agorefactor item-paths in diagnostics, symbol names
Niko Matsakis [Wed, 16 Mar 2016 09:57:03 +0000 (05:57 -0400)]
refactor item-paths in diagnostics, symbol names

This change has a few parts. We introduce a new `item_path` module for
constructing item paths. The job of this module is basically to make
nice, user-readable paths -- but these paths are not necessarily 100%
unique. They meant to help a *human* find code, but not necessarily a
compute. These paths are used to drive `item_path_str` but also symbol
names.

Because the paths are not unique, we also modify the symbol name hash to
include the full `DefPath`, whereas before it included only those
aspects of the def-path that were not included in the "informative"
symbol name.

Eventually, I'd like to make the item-path infrastructure a bit more
declarative.  Right now it's based purely on strings. In particular, for
impls, we should supply the raw types to the `ItemPathBuffer`, so that
symbol names can be encoded using the C++ encoding scheme for better
integration with tooling.

8 years agoadd krate_attrs accessor
Niko Matsakis [Wed, 16 Mar 2016 09:53:45 +0000 (05:53 -0400)]
add krate_attrs accessor

makes better edges in dep graph

8 years agotrack the extern-crate def-id rather than path
Niko Matsakis [Wed, 16 Mar 2016 09:50:38 +0000 (05:50 -0400)]
track the extern-crate def-id rather than path

We used to track, for each crate, a path that led to the extern-crate
that imported it. Instead of that, track the def-id of the extern crate,
along with a bit more information, and derive the path on the fly.

8 years agofallout: update codegen-units tests
Niko Matsakis [Wed, 16 Mar 2016 09:35:03 +0000 (05:35 -0400)]
fallout: update codegen-units tests

8 years agorefactor DefPathData variants
Niko Matsakis [Wed, 16 Mar 2016 09:47:18 +0000 (05:47 -0400)]
refactor DefPathData variants

In particular, remove the name from the Impl, since that name is
synthesized and is not predictable (it tends to break incr. comp.).

Also rename the variants to be a bit more uniform and remove some
distinctions that we were not really taking advantage of anywhere.

8 years agostore krate information more uniformly
Niko Matsakis [Wed, 16 Mar 2016 09:40:14 +0000 (05:40 -0400)]
store krate information more uniformly

make DefPath store krate and enable uniform access to crate_name/crate_disambiguator

8 years agotrack def-id for inlined items
Niko Matsakis [Wed, 16 Mar 2016 09:31:51 +0000 (05:31 -0400)]
track def-id for inlined items

8 years agoAdd a "link-guard" to avoid accidentally linking to a wrong dylib at runtime.
Michael Woerister [Tue, 1 Mar 2016 13:19:00 +0000 (08:19 -0500)]
Add a "link-guard" to avoid accidentally linking to a wrong dylib at runtime.

We want to prevent compiling something against one version
of a dynamic library and then, at runtime accidentally
using a different version of the dynamic library. With the
old symbol-naming scheme this could not happen because every
symbol had the SVH in it and you'd get an error by the
dynamic linker when using the wrong version of a dylib. With
the new naming scheme this isn't the case any more, so this
patch adds the "link-guard" to prevent this error case.

This is implemented as follows:

- In every crate that we compile, we emit a function called
  "__rustc_link_guard_<crate-name>_<crate-svh>"
- The body of this function contains calls to the
  "__rustc_link_guard" functions of all dependencies.
- An executable contains a call to it's own
  "__rustc_link_guard" function.

As a consequence the "__rustc_link_guard" function call graph
mirrors the crate graph and the dynamic linker will fail if a
wrong dylib is loaded somewhere because its
"__rustc_link_guard" function will contain a different SVH in
its name.

8 years agoRemove old symbol naming code.
Michael Woerister [Tue, 1 Mar 2016 13:18:21 +0000 (08:18 -0500)]
Remove old symbol naming code.

8 years agoMake the compiler emit an error if the crate graph contains two crates with the same...
Michael Woerister [Fri, 26 Feb 2016 21:25:25 +0000 (16:25 -0500)]
Make the compiler emit an error if the crate graph contains two crates with the same crate-name and crate-salt but different SVHs.

8 years agoSalt test crates in buildsystem.
Michael Woerister [Thu, 18 Feb 2016 18:05:13 +0000 (13:05 -0500)]
Salt test crates in buildsystem.

8 years agoAdd a test to verify that we have reproducible compiler builds.
Michael Woerister [Thu, 18 Feb 2016 04:42:36 +0000 (23:42 -0500)]
Add a test to verify that we have reproducible compiler builds.

8 years agoUse new symbol names for items of various kinds.
Michael Woerister [Mon, 15 Feb 2016 20:41:16 +0000 (15:41 -0500)]
Use new symbol names for items of various kinds.

8 years agoUse new symbol naming scheme for object shims.
Michael Woerister [Tue, 1 Mar 2016 13:16:48 +0000 (08:16 -0500)]
Use new symbol naming scheme for object shims.

8 years agoUse new symbol naming scheme for fn-once-shims.
Michael Woerister [Sun, 14 Feb 2016 23:15:49 +0000 (18:15 -0500)]
Use new symbol naming scheme for fn-once-shims.

8 years agoUse new symbol naming scheme for fn-pointer-shims.
Michael Woerister [Sun, 14 Feb 2016 23:08:08 +0000 (18:08 -0500)]
Use new symbol naming scheme for fn-pointer-shims.

8 years agoMake drop glue use new symbol naming scheme.
Michael Woerister [Sun, 14 Feb 2016 22:38:49 +0000 (17:38 -0500)]
Make drop glue use new symbol naming scheme.

8 years agoMake closures use stable symbol names.
Michael Woerister [Sun, 14 Feb 2016 18:18:28 +0000 (13:18 -0500)]
Make closures use stable symbol names.

8 years agoMake monomorphized functions use stable symbol names.
Michael Woerister [Sun, 14 Feb 2016 18:01:44 +0000 (13:01 -0500)]
Make monomorphized functions use stable symbol names.

8 years agoMake the definite name of the local crate available in the tcx.
Michael Woerister [Sun, 14 Feb 2016 17:30:38 +0000 (12:30 -0500)]
Make the definite name of the local crate available in the tcx.

8 years agoCompute a salt from arguments passed via -Cmetadata.
Michael Woerister [Fri, 12 Feb 2016 13:41:30 +0000 (08:41 -0500)]
Compute a salt from arguments passed via -Cmetadata.

8 years agoMake library paths passed by compiletest tool absolute.
Michael Woerister [Mon, 29 Feb 2016 13:44:06 +0000 (08:44 -0500)]
Make library paths passed by compiletest tool absolute.

Otherwise, changing the current working directory can mess up runtime linking.

8 years agoMake CrateStore::crate_name() return an InternedString to avoid unnecessary allocations.
Michael Woerister [Fri, 12 Feb 2016 17:43:13 +0000 (12:43 -0500)]
Make CrateStore::crate_name() return an InternedString to avoid unnecessary allocations.

8 years agoAdd missing entries for enum variants in trans::CrateContext::external_srcs.
Michael Woerister [Sat, 13 Feb 2016 17:55:04 +0000 (12:55 -0500)]
Add missing entries for enum variants in trans::CrateContext::external_srcs.

8 years agoCrateStore: Allow for custom def_id_to_string mappings in encode_type().
Michael Woerister [Wed, 10 Feb 2016 15:04:45 +0000 (10:04 -0500)]
CrateStore: Allow for custom def_id_to_string mappings in encode_type().

8 years agoAuto merge of #31908 - jseyfried:disallow_shadowed_traits, r=nikomatsakis
bors [Fri, 25 Mar 2016 12:03:13 +0000 (05:03 -0700)]
Auto merge of #31908 - jseyfried:disallow_shadowed_traits, r=nikomatsakis

Disallow methods from traits that are not in scope

This PR only allows a trait method to be used if the trait is in scope (fixes #31379).
This is a [breaking-change]. For example, the following would break:
```rust
mod foo {
    pub trait T { fn f(&self) {} }
    impl T for () {}
}

mod bar { pub use foo::T; }

fn main() {
    pub use bar::*;
    struct T; // This shadows the trait `T`,
    ().f() // making this an error.
}
```
r? @nikomatsakis

8 years agoAuto merge of #32428 - nikomatsakis:scopes-in-mir, r=nagisa
bors [Fri, 25 Mar 2016 06:12:57 +0000 (23:12 -0700)]
Auto merge of #32428 - nikomatsakis:scopes-in-mir, r=nagisa

Scopes in mir

This PR adds scopes to MIR. There is a tree of scopes (each represented by a `ScopeId`). Every statement, variable, and terminator now has an associated scope and span.  It also adds a `-Z dump-mir` switch one can use to conveniently examine the MIR as optimizations proceed.

The intention is two-fold. First, to support MIR debug-info. This PR does not attempt to modify trans to make use of the scope information, however.

Second, in a more temporary capacity, to support the goal of moving regionck and borowck into the MIR. To that end, the PR also constructs a "scope auxiliary" table storing the extent of each span (this is kept separate from the main MIR, since it contains node-ids) and the dom/post-dom of the region in the graph where the scope occurs. When we move to non-lexical lifetimes, I expect this auxiliary information to be discarded, but that is still some ways in the future (requires, at minimum, an RFC, and there are some thorny details to work out -- though I've got an in-progress draft).

Right now, I'm just dropping this auxiliary information after it is constructed. I was debating for some time whether to add some sort of sanity tests, but decided to just open this PR instead, because I couldn't figure out what such a test would look like (and we don't have independent tests for this today beyond the regionck and borrowck tests).

I'd prefer not to store the auxiliary data into any kind of "per-fn" map. Rather, I'd prefer that we do regionck/borrowck/whatever-else immediately after construction -- that is, we build the MIR for fn X and immediately thereafter do extended correctness checking on it. This will reduce peak memory usage and also ensure that the auxiliary data doesn't exist once optimizations begin. It also clarifies the transition point where static checks are complete and MIR can be more freely optimized.

cc @rust-lang/compiler @nagisa

8 years agoAuto merge of #32396 - nodakai:range-contains, r=alexcrichton
bors [Fri, 25 Mar 2016 02:38:43 +0000 (19:38 -0700)]
Auto merge of #32396 - nodakai:range-contains, r=alexcrichton

Add core::ops::Range*::contains() as per rust-lang/rust#32311

8 years agoAuto merge of #32346 - nikomatsakis:no-erased-regions, r=eddyb
bors [Thu, 24 Mar 2016 21:22:26 +0000 (14:22 -0700)]
Auto merge of #32346 - nikomatsakis:no-erased-regions, r=eddyb

Remove `ErasedRegions` from substs

This commit removes the `ErasedRegions` enum from `Substs`. Instead, in trans, we just generate a vector of `ReStatic` of suitable length. The goal is both general cleanup and to help pave the way for a glorious future where erasure is used in type check.

r? @eddyb

One concern: might be nice to do some profiling. Not sure the best way to do that. Perhaps I'll investigate running nrc's test suite locally.

8 years agoremove `empty_substs_for_node_id`
Niko Matsakis [Sat, 19 Mar 2016 09:33:16 +0000 (05:33 -0400)]
remove `empty_substs_for_node_id`

8 years agoremove ErasedRegions from substitutions
Niko Matsakis [Wed, 9 Mar 2016 23:22:05 +0000 (18:22 -0500)]
remove ErasedRegions from substitutions

This hack has long since outlived its usefulness; the transition to
trans passing around full substitutions is basically done. Instead of
`ErasedRegions`, just supply substitutions with a suitable number of
`'static` entries, and invoke `erase_regions` when needed (the latter of
which we already do).

8 years agorewrite foreign types lint not to trawl the HIR
Niko Matsakis [Wed, 16 Mar 2016 19:53:08 +0000 (15:53 -0400)]
rewrite foreign types lint not to trawl the HIR

It no longer reads from `ast_ty_to_ty_cache`, which was very wrong. It
also correctly handles higher-ranked regions.

8 years agoAuto merge of #32465 - steveklabnik:rollup, r=steveklabnik
bors [Thu, 24 Mar 2016 16:25:02 +0000 (09:25 -0700)]
Auto merge of #32465 - steveklabnik:rollup, r=steveklabnik

Rollup of 6 pull requests

- Successful merges: #32276, #32416, #32452, #32459, #32462, #32464
- Failed merges:

8 years agoRollup merge of #32464 - GuillaumeGomez:patch-6, r=steveklabnik
Steve Klabnik [Thu, 24 Mar 2016 14:37:24 +0000 (10:37 -0400)]
Rollup merge of #32464 - GuillaumeGomez:patch-6, r=steveklabnik

Improve some Option code example

Part of #29366.

r? @steveklabnik

8 years agoRollup merge of #32462 - tclfs:patch-1, r=steveklabnik
Steve Klabnik [Thu, 24 Mar 2016 14:37:24 +0000 (10:37 -0400)]
Rollup merge of #32462 - tclfs:patch-1, r=steveklabnik

Docs: some tiny corrections

TNT->`tnt`
firecracker->`firecracker`

8 years agoRollup merge of #32459 - nrc:json-err-text, r=nikomatsakis
Steve Klabnik [Thu, 24 Mar 2016 14:37:24 +0000 (10:37 -0400)]
Rollup merge of #32459 - nrc:json-err-text, r=nikomatsakis

Include source text in JSON errors

8 years agoRollup merge of #32452 - GuillaumeGomez:patch-5, r=steveklabnik
Steve Klabnik [Thu, 24 Mar 2016 14:37:24 +0000 (10:37 -0400)]
Rollup merge of #32452 - GuillaumeGomez:patch-5, r=steveklabnik

Add code examples for libstd/time

Fixes #29379.

r? @steveklabnik

8 years agoRollup merge of #32416 - GuillaumeGomez:patch-3, r=steveklabnik
Steve Klabnik [Thu, 24 Mar 2016 14:37:23 +0000 (10:37 -0400)]
Rollup merge of #32416 - GuillaumeGomez:patch-3, r=steveklabnik

Add doc example to clone trait

Fixes #29346.

r? @steveklabnik

8 years agoRollup merge of #32276 - brson:doc, r=alexcrichton
Steve Klabnik [Thu, 24 Mar 2016 14:37:23 +0000 (10:37 -0400)]
Rollup merge of #32276 - brson:doc, r=alexcrichton

doc: Stdin is not writable

8 years agopacify the merciless tidy
Niko Matsakis [Thu, 24 Mar 2016 11:11:11 +0000 (07:11 -0400)]
pacify the merciless tidy

8 years agoImprove some Option code example
Guillaume Gomez [Thu, 24 Mar 2016 12:24:39 +0000 (13:24 +0100)]
Improve some Option code example

8 years agorework MIR visitor
Niko Matsakis [Thu, 24 Mar 2016 10:12:19 +0000 (06:12 -0400)]
rework MIR visitor

We now visit more things (e.g., types) and also follow a deliberate
style designed to reduce omissions.

8 years agoDocs: some tiny corrections
Tang Chenglong [Thu, 24 Mar 2016 06:49:40 +0000 (14:49 +0800)]
Docs: some tiny corrections

TNT->`tnt`
firecracker->`firecracker`

8 years agoAuto merge of #32219 - brson:lints, r=alexcrichton
bors [Thu, 24 Mar 2016 06:09:47 +0000 (23:09 -0700)]
Auto merge of #32219 - brson:lints, r=alexcrichton

Make warnings of renamed and removed lints themselves lints

This adds the `renamed_and_removed_lints` warning, defaulting
to the warning level.

Fixes #31141

8 years agoInclude source text in JSON errors
Nick Cameron [Thu, 24 Mar 2016 02:32:42 +0000 (15:32 +1300)]
Include source text in JSON errors

8 years agoAdd core::ops::Range*::contains() as per rust-lang/rust#32311
NODA, Kai [Sun, 20 Mar 2016 08:59:38 +0000 (16:59 +0800)]
Add core::ops::Range*::contains() as per rust-lang/rust#32311

Signed-off-by: NODA, Kai <nodakai@gmail.com>
8 years agorewrite scope drop to be iterative
Niko Matsakis [Thu, 24 Mar 2016 00:46:38 +0000 (20:46 -0400)]
rewrite scope drop to be iterative

while I'm at it, remove the "extra caching" that I was doing for no good
reason except laziness. Basically before I was caching at each scope in
the chain, but there's not really a reason to do that, since the cached
entry point at level N is always equal to the last cached exit point
from level N-1.

8 years agoMake warnings of renamed and removed lints themselves lints
Brian Anderson [Sat, 12 Mar 2016 20:46:59 +0000 (20:46 +0000)]
Make warnings of renamed and removed lints themselves lints

This adds the `renamed_and_removed_lints` warning, defaulting
to the warning level.

Fixes #31141

8 years agodoc: Stdin is locked for reads, not writes
Brian Anderson [Wed, 23 Mar 2016 23:39:01 +0000 (23:39 +0000)]
doc: Stdin is locked for reads, not writes

8 years agoAuto merge of #32455 - TimNN:patch-1, r=alexcrichton
bors [Wed, 23 Mar 2016 23:24:39 +0000 (16:24 -0700)]
Auto merge of #32455 - TimNN:patch-1, r=alexcrichton

add naked function tracking issue # to feature gate definition

8 years agointroduce "call-site-scope" as the outermost scope
Niko Matsakis [Wed, 23 Mar 2016 16:26:37 +0000 (12:26 -0400)]
introduce "call-site-scope" as the outermost scope

also, when exiting a scope, assign the final goto terminator with the
target scope's id

8 years agoUpdate borrowck to use `repr::*` instead of a mix
Niko Matsakis [Wed, 23 Mar 2016 09:57:52 +0000 (05:57 -0400)]
Update borrowck to use `repr::*` instead of a mix

We should probably settle on some conventions here. In MIR code, I have
generally been importing `*`, but perhaps borrowck does not want to do
that.

8 years agoadd comments on remaining fields
Niko Matsakis [Wed, 23 Mar 2016 09:18:49 +0000 (05:18 -0400)]
add comments on remaining fields

8 years agoAdd `ScopeAuxiliaryVec`, return MIR+aux via tuple
Niko Matsakis [Wed, 23 Mar 2016 09:01:30 +0000 (05:01 -0400)]
Add `ScopeAuxiliaryVec`, return MIR+aux via tuple

It's nice to be able to index with a scope-id,
but coherence rules prevent us from implementing
`Index<ScopeId>` for `Vec<ScopeAuxiliary>`, and I'd
prefer that `ScopeAuxiliary` remain in librustc_mir,
just for compilation time reasons.

8 years agoAddress nit: Remove `ScopedDataVec` newtype
Niko Matsakis [Wed, 23 Mar 2016 08:59:44 +0000 (04:59 -0400)]
Address nit: Remove `ScopedDataVec` newtype

8 years agoAddress nit: block.unit()
Niko Matsakis [Wed, 23 Mar 2016 08:25:09 +0000 (04:25 -0400)]
Address nit: block.unit()

8 years agoAddress nit: doc-comments on fields
Niko Matsakis [Wed, 23 Mar 2016 08:24:42 +0000 (04:24 -0400)]
Address nit: doc-comments on fields

8 years agoAddress nit: use doc-comments for fields of VarDecl
Niko Matsakis [Wed, 23 Mar 2016 08:21:02 +0000 (04:21 -0400)]
Address nit: use doc-comments for fields of VarDecl

8 years agoRename `MirPlusPlus` to `MirAndScopeAuxiliary`
Niko Matsakis [Wed, 23 Mar 2016 08:19:16 +0000 (04:19 -0400)]
Rename `MirPlusPlus` to `MirAndScopeAuxiliary`

8 years agoreplace DUMMY_SP on resume with span from fn
Niko Matsakis [Wed, 23 Mar 2016 00:41:07 +0000 (20:41 -0400)]
replace DUMMY_SP on resume with span from fn

8 years agorewrite drop code
Niko Matsakis [Wed, 23 Mar 2016 00:39:29 +0000 (20:39 -0400)]
rewrite drop code

This was triggered by me wanting to address a use of DUMMY_SP, but
actually I'm not sure what would be a better span -- I guess the span
for the function as a whole.

8 years agofix bug in `simplify_cfg` with inf. loops
Niko Matsakis [Tue, 22 Mar 2016 20:19:44 +0000 (16:19 -0400)]
fix bug in `simplify_cfg` with inf. loops

8 years agoallow dumping intermediate IR with -Z dump-mir
Niko Matsakis [Tue, 22 Mar 2016 20:05:28 +0000 (16:05 -0400)]
allow dumping intermediate IR with -Z dump-mir

8 years agoadjust pretty printer to print scopes / auxiliary
Niko Matsakis [Tue, 22 Mar 2016 15:52:34 +0000 (11:52 -0400)]
adjust pretty printer to print scopes / auxiliary

8 years agoaugment MIR pretty printer to print scopes
Niko Matsakis [Tue, 22 Mar 2016 14:08:44 +0000 (10:08 -0400)]
augment MIR pretty printer to print scopes

8 years agoreformat mir text pretty printer
Niko Matsakis [Sat, 19 Mar 2016 11:13:54 +0000 (07:13 -0400)]
reformat mir text pretty printer

8 years agoadd span/scope-id to terminator
Niko Matsakis [Fri, 18 Mar 2016 12:52:13 +0000 (08:52 -0400)]
add span/scope-id to terminator

8 years agoextend Terminator into a struct so it can have additional fields
Niko Matsakis [Thu, 10 Mar 2016 14:55:15 +0000 (09:55 -0500)]
extend Terminator into a struct so it can have additional fields

8 years agotrack the innermost scope for every stmt
Niko Matsakis [Wed, 9 Mar 2016 18:36:04 +0000 (13:36 -0500)]
track the innermost scope for every stmt

8 years agorecord a scope for each `VarDecl`
Niko Matsakis [Wed, 9 Mar 2016 17:36:07 +0000 (12:36 -0500)]
record a scope for each `VarDecl`

8 years agointegrate scopes into MIR
Niko Matsakis [Wed, 9 Mar 2016 16:04:26 +0000 (11:04 -0500)]
integrate scopes into MIR

8 years agoAuto merge of #32454 - eddyb:rollup, r=eddyb
bors [Wed, 23 Mar 2016 19:33:04 +0000 (12:33 -0700)]
Auto merge of #32454 - eddyb:rollup, r=eddyb

Rollup of 11 pull requests

- Successful merges: #32404, #32420, #32423, #32425, #32429, #32430, #32431, #32434, #32437, #32441, #32443
- Failed merges:

8 years agoadd naked function tracking issue # to feature gate definition
Tim Neumann [Wed, 23 Mar 2016 16:14:19 +0000 (17:14 +0100)]
add naked function tracking issue # to feature gate definition

8 years agoRollup merge of #32443 - tclfs:patch-8, r=steveklabnik
Eduard-Mihai Burtescu [Wed, 23 Mar 2016 15:59:16 +0000 (17:59 +0200)]
Rollup merge of #32443 - tclfs:patch-8, r=steveklabnik

Docs: Change "statements" to "expressions" on `match`

I apt to use `expressions` over `statements`, because `match` is a expression in essence, though it can become a statement when followed a semicolon.

8 years agoRollup merge of #32441 - tshepang:doc-primitive, r=steveklabnik
Eduard-Mihai Burtescu [Wed, 23 Mar 2016 15:59:16 +0000 (17:59 +0200)]
Rollup merge of #32441 - tshepang:doc-primitive, r=steveklabnik

doc: small char improvements

8 years agoRollup merge of #32437 - eddyb:orbital-msvc, r=alexcrichton
Eduard-Mihai Burtescu [Wed, 23 Mar 2016 15:59:16 +0000 (17:59 +0200)]
Rollup merge of #32437 - eddyb:orbital-msvc, r=alexcrichton

Annotate run-pass/backtrace with #[rustc_no_mir] on MSVC.

Fixes #32384 by not using MIR on MSVC for the functions in the path of the backtrace.
This is the known blocker for the MSVC MIR builder, hopefully the only one overall.
r? @alexcrichton Confirmed to work on a nightly, by @retep998.

8 years agoRollup merge of #32434 - mitaa:rdoc-no-inline, r=alexcrichton
Eduard-Mihai Burtescu [Wed, 23 Mar 2016 15:59:16 +0000 (17:59 +0200)]
Rollup merge of #32434 - mitaa:rdoc-no-inline, r=alexcrichton

rustdoc: Consider `doc(no_inline)` in crate-local inlining

Imports with `doc(no_inline)` will not be inlined, even when `doc(inline)` is present.

fixes #32343

r? @alexcrichton

8 years agoRollup merge of #32431 - nicholasf:tweak/improve-expression, r=steveklabnik
Eduard-Mihai Burtescu [Wed, 23 Mar 2016 15:59:15 +0000 (17:59 +0200)]
Rollup merge of #32431 - nicholasf:tweak/improve-expression, r=steveklabnik

Simplifying some of the phrasing explaining lifetime elision

Just simplifying some of the language expressing what kind of inference Rust can and can't do on function signatures.

8 years agoRollup merge of #32430 - sanxiyn:const-trans, r=arielb1
Eduard-Mihai Burtescu [Wed, 23 Mar 2016 15:59:15 +0000 (17:59 +0200)]
Rollup merge of #32430 - sanxiyn:const-trans, r=arielb1

Fix const trans

Fix #30615.

The idea was that when there are N autoderefs, first do N-1 derefs and check for autoref. If there is autoref, done, if not, do one more deref. But when N is zero, doing one more deref is wrong.

8 years agoRollup merge of #32429 - alexcrichton:scope-id-hton, r=aturon
Eduard-Mihai Burtescu [Wed, 23 Mar 2016 15:59:15 +0000 (17:59 +0200)]
Rollup merge of #32429 - alexcrichton:scope-id-hton, r=aturon

std: Store flowinfo/scope_id in host byte order

Apparently these aren't supposed to be stored in network byte order, so doing so
ends up causing failures when it would otherwise succeed when stored in the host
byte order.

Closes #32424

8 years agoRollup merge of #32425 - ituxbag:master, r=alexcrichton
Eduard-Mihai Burtescu [Wed, 23 Mar 2016 15:59:15 +0000 (17:59 +0200)]
Rollup merge of #32425 - ituxbag:master, r=alexcrichton

Added version 7.3* for Apple's clang compiler

The recent 7.3 clang version was missing.

Closes #32442

8 years agoRollup merge of #32423 - mitaa:rdoc-vstruct-fields, r=alexcrichton
Eduard-Mihai Burtescu [Wed, 23 Mar 2016 15:59:15 +0000 (17:59 +0200)]
Rollup merge of #32423 - mitaa:rdoc-vstruct-fields, r=alexcrichton

rustdoc: Omit `pub` for inlined variant-struct fields

fixes #32395

r? @alexcrichton

8 years agoRollup merge of #32420 - frewsxcv:regression-test-26997, r=alexcrichton
Eduard-Mihai Burtescu [Wed, 23 Mar 2016 15:59:14 +0000 (17:59 +0200)]
Rollup merge of #32420 - frewsxcv:regression-test-26997, r=alexcrichton

Add regression test for Issue 26997.

https://github.com/rust-lang/rust/issues/26997

8 years agoRollup merge of #32404 - WiSaGaN:feature/osstring-implement-default, r=aturon
Eduard-Mihai Burtescu [Wed, 23 Mar 2016 15:59:14 +0000 (17:59 +0200)]
Rollup merge of #32404 - WiSaGaN:feature/osstring-implement-default, r=aturon

Implement Default trait for OsString/OsStr

Fixes #32385

8 years agoAuto merge of #32390 - japaric:untry, r=pnkfelix
bors [Wed, 23 Mar 2016 15:59:10 +0000 (08:59 -0700)]
Auto merge of #32390 - japaric:untry, r=pnkfelix

convert 99.9% of `try!`s to `?`s

The first commit is an automated conversion using the [untry] tool and the following command:

```
$ find -name '*.rs' -type f | xargs untry
```

at the root of the Rust repo.

[untry]: https://github.com/japaric/untry

cc @rust-lang/lang @alexcrichton @brson

8 years agoAdd code examples for libstd/time
Guillaume Gomez [Wed, 23 Mar 2016 13:17:19 +0000 (14:17 +0100)]
Add code examples for libstd/time

8 years agoadd back `&` that was deleted by mistake
Jorge Aparicio [Wed, 23 Mar 2016 11:17:29 +0000 (06:17 -0500)]
add back `&` that was deleted by mistake

8 years agoAuto merge of #32410 - Ticki:master, r=eddyb
bors [Wed, 23 Mar 2016 10:49:02 +0000 (03:49 -0700)]
Auto merge of #32410 - Ticki:master, r=eddyb

Add support for naked functions

See https://github.com/rust-lang/rfcs/pull/1201#issuecomment-199442239

This PR adds `#[naked]` for marking naked functions.

8 years agoAuto merge of #32348 - brson:cargotest, r=alexcrichton
bors [Wed, 23 Mar 2016 08:03:04 +0000 (01:03 -0700)]
Auto merge of #32348 - brson:cargotest, r=alexcrichton

Introduce 'cargotest' and the check-cargotest buildstep

This is a new suite of tests that verifies that the compiler builds specific revisions of select crates from crates.io.

It does not run by default. It is intended that bors runs these tests against all PRs, and gates on them. In this way we will make it harder still to break important swaths of the ecosystem, even on nightly.

This is a very basic implementation intended for feedback. The biggest thing it probably should do but doesn't is use a lockfile for every project it builds.

r? @alexcrichton cc @rust-lang/lang @rust-lang/libs

8 years agoAuto merge of #32058 - pczarn:hashmap-initial-refactoring, r=apasel422
bors [Wed, 23 Mar 2016 04:21:45 +0000 (21:21 -0700)]
Auto merge of #32058 - pczarn:hashmap-initial-refactoring, r=apasel422

Basic refactoring of HashMap

8 years agoDocs: Change "statements" to "expressions" on `match`
Tang Chenglong [Wed, 23 Mar 2016 04:03:41 +0000 (12:03 +0800)]
Docs: Change "statements" to "expressions" on `match`

I apt to use `expressions` over `statements`, because `match` is a expression in essence, though it can become a statement when followed a semicolon.

8 years agoenable question_mark feature in rustc_borrowck
Jorge Aparicio [Wed, 23 Mar 2016 02:59:17 +0000 (21:59 -0500)]
enable question_mark feature in rustc_borrowck

8 years agofix alignment
Jorge Aparicio [Tue, 22 Mar 2016 22:58:45 +0000 (17:58 -0500)]
fix alignment

8 years agobreak long line
Jorge Aparicio [Mon, 21 Mar 2016 08:38:25 +0000 (03:38 -0500)]
break long line

8 years agoterm: undo conversion of user defined try!s
Jorge Aparicio [Mon, 21 Mar 2016 07:24:07 +0000 (02:24 -0500)]
term: undo conversion of user defined try!s

8 years agostd: undo conversion of user defined try!s
Jorge Aparicio [Mon, 21 Mar 2016 07:23:47 +0000 (02:23 -0500)]
std: undo conversion of user defined try!s

8 years agosprinkle feature gates here and there
Jorge Aparicio [Mon, 21 Mar 2016 07:23:03 +0000 (02:23 -0500)]
sprinkle feature gates here and there