]> git.lizzy.rs Git - rust.git/log
rust.git
8 years agoRollup merge of #31220 - steveklabnik:gh30632, r=nikomatsakis
Manish Goregaokar [Tue, 2 Feb 2016 21:24:24 +0000 (02:54 +0530)]
Rollup merge of #31220 - steveklabnik:gh30632, r=nikomatsakis

Fixes #30632

I'm not sure if this explanation is good enough. If it is, I will add it to filter as well.

8 years agoRollup merge of #27499 - barosl:macro-doc-raw-str-hashes, r=nikomatsakis
Manish Goregaokar [Tue, 2 Feb 2016 21:24:24 +0000 (02:54 +0530)]
Rollup merge of #27499 - barosl:macro-doc-raw-str-hashes, r=nikomatsakis

Any documentation comments that contain raw-string-looking sequences may pretty-print invalid code when expanding them, as the current logic always uses the `r"literal"` form, without appending any `#`s.

This commit calculates the minimum number of `#`s required to wrap a comment correctly and appends `#`s appropriately.

Fixes #27489.

8 years agoAuto merge of #31254 - tmiasko:macro-pretty-print-fix, r=sfackler
bors [Tue, 2 Feb 2016 14:00:50 +0000 (14:00 +0000)]
Auto merge of #31254 - tmiasko:macro-pretty-print-fix, r=sfackler

Pretty printing of macro with braces but without terminated semicolon
removed more boxes from stack than it put there, resulting in panic.
This fixes the issue #30731.

8 years agoAuto merge of #30991 - rthomas:master, r=Gankro
bors [Tue, 2 Feb 2016 10:45:06 +0000 (10:45 +0000)]
Auto merge of #30991 - rthomas:master, r=Gankro

Using the test @bluss suggested in #30983

8 years agoAuto merge of #31359 - steveklabnik:rollup, r=steveklabnik
bors [Tue, 2 Feb 2016 07:28:04 +0000 (07:28 +0000)]
Auto merge of #31359 - steveklabnik:rollup, r=steveklabnik

- Successful merges: #30971, #31202, #31247, #31270, #31281, #31327, #31339, #31340, #31342, #31344, #31345, #31346, #31348
- Failed merges:

8 years agoEnsure capacity returned of HashMap is max(capacity, length).
Ryan Thomas [Tue, 2 Feb 2016 06:15:27 +0000 (17:15 +1100)]
Ensure capacity returned of HashMap is max(capacity, length).

r? @Gankro

8 years agoRollup merge of #31348 - alexcrichton:shuffle-tiers, r=steveklabnik
Steve Klabnik [Tue, 2 Feb 2016 05:32:20 +0000 (00:32 -0500)]
Rollup merge of #31348 - alexcrichton:shuffle-tiers, r=steveklabnik

Some other shufflings as well:

* Three powerpc triples for Linux have been added recently
* An armv7 linux triple was added recently
* The 64-bit Solaris triple is now mentioned in tier 3

We are currently now also building nightlies for iOS, powerpc triples, and
armv7, but there hasn't been much vetting of the triples themselves so I've left
them in tier 3 for now.

8 years agoRollup merge of #31346 - alopatindev:fixes, r=aturon
Steve Klabnik [Tue, 2 Feb 2016 05:32:19 +0000 (00:32 -0500)]
Rollup merge of #31346 - alopatindev:fixes, r=aturon

Space character is missed after `let some_usize`

8 years agoRollup merge of #31345 - kamalmarhubi:book-docs-special-section-errors, r=steveklabnik
Steve Klabnik [Tue, 2 Feb 2016 05:32:19 +0000 (00:32 -0500)]
Rollup merge of #31345 - kamalmarhubi:book-docs-special-section-errors, r=steveklabnik

This matches the usage in the standard library's documentation.

8 years agoRollup merge of #31344 - steveklabnik:gh31334, r=alexcrichton
Steve Klabnik [Tue, 2 Feb 2016 05:32:19 +0000 (00:32 -0500)]
Rollup merge of #31344 - steveklabnik:gh31334, r=alexcrichton

Fixes #31334

This is just a quicker fix for this issue; since I'm working on the next draft of the book, I don't want to put a huuuge amount of work into improving it here.

8 years agoRollup merge of #31342 - reeze:patch-1, r=steveklabnik
Steve Klabnik [Tue, 2 Feb 2016 05:32:19 +0000 (00:32 -0500)]
Rollup merge of #31342 - reeze:patch-1, r=steveklabnik

8 years agoRollup merge of #31340 - pra85:patch-1, r=alexcrichton
Steve Klabnik [Tue, 2 Feb 2016 05:32:19 +0000 (00:32 -0500)]
Rollup merge of #31340 - pra85:patch-1, r=alexcrichton

Spelling mistake -
`familliar` > `familiar`

8 years agoRollup merge of #31339 - rthomas:doc, r=alexcrichton
Steve Klabnik [Tue, 2 Feb 2016 05:32:18 +0000 (00:32 -0500)]
Rollup merge of #31339 - rthomas:doc, r=alexcrichton

When trying to run a specific test, I found the contributing docs a bit confusing and through a bit of googling found out that TESTNAME takes the fully qual'd name of the test.

I'm unsure if this can also take the source file, but I was unable to get that to work.

8 years agoRollup merge of #31327 - dirk:dirk/process-child-safety-docs, r=alexcrichton
Steve Klabnik [Tue, 2 Feb 2016 05:32:18 +0000 (00:32 -0500)]
Rollup merge of #31327 - dirk:dirk/process-child-safety-docs, r=alexcrichton

`Drop` is not implemented for `Child`, so if it goes out of scope in Rust-land and gets deallocated the child process will continue to exist and execute. If users want a guarantee that the process has finished running and exited they must manually use `kill`, `wait`, or `wait_with_output`.

Fixes #31289.

r? @steveklabnik

8 years agoRollup merge of #31281 - oli-obk:patch-2, r=nikomatsakis
Steve Klabnik [Tue, 2 Feb 2016 05:32:18 +0000 (00:32 -0500)]
Rollup merge of #31281 - oli-obk:patch-2, r=nikomatsakis

8 years agoRollup merge of #31270 - ruud-v-a:improve-e0507, r=steveklabnik
Steve Klabnik [Tue, 2 Feb 2016 05:32:18 +0000 (00:32 -0500)]
Rollup merge of #31270 - ruud-v-a:improve-e0507, r=steveklabnik

E0507 can occur when you try to move out of a member of a mutably borrowed struct, in which case `mem::replace` can help. Mentioning that here hopefully saves future users a trip to Google.

8 years agoRollup merge of #31247 - tshepang:redundant-bindings, r=steveklabnik
Steve Klabnik [Tue, 2 Feb 2016 05:32:18 +0000 (00:32 -0500)]
Rollup merge of #31247 - tshepang:redundant-bindings, r=steveklabnik

8 years agoRollup merge of #31202 - steveklabnik:gh30459, r=alexcrichton
Steve Klabnik [Tue, 2 Feb 2016 05:32:17 +0000 (00:32 -0500)]
Rollup merge of #31202 - steveklabnik:gh30459, r=alexcrichton

Fixes #30459

Fun fact: i wanted to write "Arabic" and "Hebrew" in Arabic and Hebrew, but vim kept doing the copy/paste in the wrong direction.

8 years agoRollup merge of #30971 - SDX2000:docfixes, r=steveklabnik
Steve Klabnik [Tue, 2 Feb 2016 05:32:17 +0000 (00:32 -0500)]
Rollup merge of #30971 - SDX2000:docfixes, r=steveklabnik

Updated documentation to clarify the difference between `and_then` and `map`. This also explains why we need `and_then` in addition to `map`. Please look at the diff for more information.

r?  @alexcrichton

8 years agoAdd doctests for directionality
Steve Klabnik [Mon, 1 Feb 2016 16:26:23 +0000 (11:26 -0500)]
Add doctests for directionality

Thanks @nodakai

8 years agoAuto merge of #31314 - alexcrichton:less-warnings, r=brson
bors [Tue, 2 Feb 2016 04:33:02 +0000 (04:33 +0000)]
Auto merge of #31314 - alexcrichton:less-warnings, r=brson

Help cleans up our build a bit and stays in line with the rest of our crates
denying warnings traditionally.

8 years agodocs: Standardize on 'Errors' header in std docs
Kamal Marhubi [Tue, 2 Feb 2016 02:41:29 +0000 (21:41 -0500)]
docs: Standardize on 'Errors' header in std docs

8 years agoAuto merge of #31279 - DanielJCampbell:MacroReferencing, r=nrc
bors [Tue, 2 Feb 2016 01:35:39 +0000 (01:35 +0000)]
Auto merge of #31279 - DanielJCampbell:MacroReferencing, r=nrc

r? @nrc

8 years agoUpdate TESTNAME description
Ryan Thomas [Mon, 1 Feb 2016 23:58:59 +0000 (10:58 +1100)]
Update TESTNAME description

8 years agoUpdate TESTNAME matching description
Ryan Thomas [Mon, 1 Feb 2016 23:57:24 +0000 (10:57 +1100)]
Update TESTNAME matching description

8 years agoMerge branch 'master' of https://github.com/rust-lang/rust into doc
Ryan Thomas [Mon, 1 Feb 2016 23:54:05 +0000 (10:54 +1100)]
Merge branch 'master' of https://github.com/rust-lang/rust into doc

8 years agoAuto merge of #31250 - nrc:more-aborts, r=@nikomatsakis
bors [Mon, 1 Feb 2016 21:22:59 +0000 (21:22 +0000)]
Auto merge of #31250 - nrc:more-aborts, r=@nikomatsakis

With this PR we can save-analysis on code with errors, essential foundation work for IDE support.

8 years agodoc: Move 32-bit MSVC to a tier 1 platform
Alex Crichton [Fri, 29 Jan 2016 19:10:44 +0000 (11:10 -0800)]
doc: Move 32-bit MSVC to a tier 1 platform

Some other shufflings as well:

* Three powerpc triples for Linux have been added recently
* An armv7 linux triple was added recently
* The 64-bit Solaris triple is now mentioned in tier 3

We are currently now also building nightlies for iOS, powerpc triples, and
armv7, but there hasn't been much vetting of the triples themselves so I've left
them in tier 3 for now.

8 years agoDiscuss pitfalls of stateful closures with Map
Steve Klabnik [Tue, 26 Jan 2016 18:03:31 +0000 (13:03 -0500)]
Discuss pitfalls of stateful closures with Map

Fixes #30632

8 years agodoc: bindings not needed for this example
Tshepang Lekhonkhobe [Wed, 27 Jan 2016 20:23:52 +0000 (22:23 +0200)]
doc: bindings not needed for this example

8 years agoReviewer requested changes and test fixes
Nick Cameron [Sun, 31 Jan 2016 19:43:43 +0000 (08:43 +1300)]
Reviewer requested changes and test fixes

8 years agoAuto merge of #30367 - tamird:fix-makefile-bugs, r=alexcrichton
bors [Mon, 1 Feb 2016 18:27:54 +0000 (18:27 +0000)]
Auto merge of #30367 - tamird:fix-makefile-bugs, r=alexcrichton

Some of this is scary stuff. Probably time to lint against this.

Found with `make --warn-undefined-variables`.

r? @alexcrichton

8 years agoFix a documentation typo
Alexander Lopatin [Mon, 1 Feb 2016 18:09:19 +0000 (21:09 +0300)]
Fix a documentation typo

8 years agobook: Change "Failures" to "Errors" in doc special sections chapter
Kamal Marhubi [Mon, 1 Feb 2016 17:26:51 +0000 (12:26 -0500)]
book: Change "Failures" to "Errors" in doc special sections chapter

This matches the usage in the standard library's documentation.

8 years agomake this example more obvious
Steve Klabnik [Mon, 1 Feb 2016 16:52:00 +0000 (11:52 -0500)]
make this example more obvious

Fixes #31334

8 years agoAuto merge of #30901 - mackwic:doc-core-convert, r=steveklabnik
bors [Mon, 1 Feb 2016 16:25:13 +0000 (16:25 +0000)]
Auto merge of #30901 - mackwic:doc-core-convert, r=steveklabnik

Also add a note about the necessary simplicity of the conversion.
Related issue: #29349

r? @steveklabnik

8 years agoAuto merge of #31317 - jseyfried:remove_external_module_children, r=nrc
bors [Mon, 1 Feb 2016 14:26:48 +0000 (14:26 +0000)]
Auto merge of #31317 - jseyfried:remove_external_module_children, r=nrc

This PR refactors away `Module`'s `external_module_children` and instead puts `extern crate` declarations in `children` like other items, simplifying duplicate checking and name resolution.

This PR also allows values to share a name with extern crates, which are only defined in the type namespace. Other than that, it is a pure refactoring.

r? @nrc

8 years agoAuto merge of #31303 - alexcrichton:mips-warnings, r=aturon
bors [Mon, 1 Feb 2016 12:24:01 +0000 (12:24 +0000)]
Auto merge of #31303 - alexcrichton:mips-warnings, r=aturon

Currently any compilation to MIPS spits out the warning:

    'generic' is not a recognized processor for this target (ignoring processor)

Doesn't make for a great user experience! We don't encounter this in the normal
bootstrap because the cpu/feature set are set by the makefiles. Instead let's
just propagate these to the defaults for the entire target all the time (still
overridable from the command line) and prevent warnings from being emitted by
default.

8 years agoComment fix
Reeze Xia [Mon, 1 Feb 2016 10:53:07 +0000 (18:53 +0800)]
Comment fix

8 years agoAuto merge of #31277 - DanielJCampbell:SpanEquality, r=nrc
bors [Mon, 1 Feb 2016 10:25:31 +0000 (10:25 +0000)]
Auto merge of #31277 - DanielJCampbell:SpanEquality, r=nrc

r? @nrc

8 years agomk: fix some undefined variable warnings
Tamir Duberstein [Sun, 13 Dec 2015 17:19:27 +0000 (12:19 -0500)]
mk: fix some undefined variable warnings

Some of this is scary stuff. Probably time to lint against this.

Found with `make --warn-undefined-variables`.

8 years agoAuto merge of #31232 - stepancheg:enum-univariant, r=nrc
bors [Mon, 1 Feb 2016 07:06:05 +0000 (07:06 +0000)]
Auto merge of #31232 - stepancheg:enum-univariant, r=nrc

```
enum Univariant {
    X = 17
}
```

Fixes #10292

8 years agoFix typo in doc/book/getting-started.md
Prayag Verma [Mon, 1 Feb 2016 06:45:33 +0000 (12:15 +0530)]
Fix typo in doc/book/getting-started.md

Spelling mistake -
`familliar` > `familiar`

8 years agoImplemented macro referencing for save analysis
Daniel Campbell [Fri, 29 Jan 2016 07:22:55 +0000 (20:22 +1300)]
Implemented macro referencing for save analysis

8 years agoUpdate docs about how to run specific tests
Ryan Thomas [Mon, 1 Feb 2016 06:04:39 +0000 (17:04 +1100)]
Update docs about how to run specific tests

8 years agoAuto merge of #30866 - jseyfried:fix_shadowed_use_visibility, r=nrc
bors [Mon, 1 Feb 2016 04:52:12 +0000 (04:52 +0000)]
Auto merge of #30866 - jseyfried:fix_shadowed_use_visibility, r=nrc

This reverts PR #30324, fixing bug #30159 in which a public a glob import makes public any preceding imports that share a name with an item in the module being glob imported from.

For example,
```rust
pub fn f() {}
pub mod foo {
    fn f() {}
}

mod bar {
    use f;
    use f as g;
    pub use foo::*; // This makes the first import public but does not affect the second import.
}
```

This is a [breaking-change].

8 years agoMinor corrections in docs for `std::process::Child`
Dirk Gadsden [Sun, 31 Jan 2016 20:33:37 +0000 (12:33 -0800)]
Minor corrections in docs for `std::process::Child`

8 years agoAuto merge of #31331 - petevine:master, r=alexcrichton
bors [Sun, 31 Jan 2016 23:06:01 +0000 (23:06 +0000)]
Auto merge of #31331 - petevine:master, r=alexcrichton

The target was meant as a modern generic `armv7` option, therefore a few changes were necessary:

- gcc's `-march=armv7` was causing compilation failures on modern linux systems
- rust codegen defaulted to `cortex-a7` causing illegal instruction crashes on previous `armv7-a` processors (e.g, cortex-a5, cortex-a8)

8 years agoFix the armv7 linux target
petevine [Sun, 31 Jan 2016 21:26:34 +0000 (22:26 +0100)]
Fix the armv7 linux target

8 years agoSpans now derive equality
Daniel Campbell [Fri, 29 Jan 2016 06:33:14 +0000 (19:33 +1300)]
Spans now derive equality

8 years agoSafety docs about `std::process::Child` going out of scope
Dirk Gadsden [Sun, 31 Jan 2016 19:50:22 +0000 (11:50 -0800)]
Safety docs about `std::process::Child` going out of scope

There is no `Drop` implemented for `Child`, so if it goes out
of scope in Rust-land and gets deallocated, the child process
will continue to exist and execute. If users want a guarantee
that the process has finished running and exited they must
manually use `kill`, `wait`, or `wait_with_output`.

Fixes #31289.

8 years agoSome changes to save-analysis to cope with errors
Nick Cameron [Thu, 28 Jan 2016 00:10:04 +0000 (13:10 +1300)]
Some changes to save-analysis to cope with errors

8 years agoTry to run compiler callbacks when we error out
Nick Cameron [Wed, 27 Jan 2016 20:49:18 +0000 (09:49 +1300)]
Try to run compiler callbacks when we error out

8 years agoReplace some aborts with Results
Nick Cameron [Wed, 27 Jan 2016 06:01:01 +0000 (19:01 +1300)]
Replace some aborts with Results

Fixes #31207

by removing abort_if_new_errors

8 years agoAuto merge of #31298 - japaric:mips-musl, r=alexcrichton
bors [Sun, 31 Jan 2016 12:27:06 +0000 (12:27 +0000)]
Auto merge of #31298 - japaric:mips-musl, r=alexcrichton

This target covers MIPS devices that run the trunk version of OpenWRT.

The x86_64-unknown-linux-musl target always links statically to C libraries. For
the mips(el)-unknown-linux-musl target, we opt for dynamic linking (like most of
other targets do) to keep binary size down.

As for the C compiler flags used in the build system, we use the same flags used
for the mips(el)-unknown-linux-gnu target.

r? @alexcrichton

8 years agoupdate libc submodule
Jorge Aparicio [Sun, 31 Jan 2016 12:18:30 +0000 (07:18 -0500)]
update libc submodule

fixes failed test (std::os::raw::tests::unix) in x86_64-musl target

8 years ago Doc:std::convert: disambiguate traits and keywords
Thomas Wickham [Sun, 31 Jan 2016 11:26:15 +0000 (12:26 +0100)]
 Doc:std::convert: disambiguate traits and keywords

8 years agoRefactor away the field Module::external_module_children in resolve
Jeffrey Seyfried [Fri, 29 Jan 2016 22:21:36 +0000 (22:21 +0000)]
Refactor away the field Module::external_module_children in resolve

8 years agoRevert PR #30324, fixing a bug in which a public glob import can make preceding impor...
Jeffrey Seyfried [Fri, 18 Dec 2015 10:10:31 +0000 (10:10 +0000)]
Revert PR #30324, fixing a bug in which a public glob import can make preceding imports public (fixes #30159).

8 years agotest: Deny warnings in {core,collections}test
Alex Crichton [Sun, 31 Jan 2016 00:19:37 +0000 (16:19 -0800)]
test: Deny warnings in {core,collections}test

Help cleans up our build a bit and stays in line with the rest of our crates
denying warnings traditionally.

8 years agoAuto merge of #31288 - GuillaumeGomez:error_code_tidy, r=brson
bors [Sat, 30 Jan 2016 20:48:18 +0000 (20:48 +0000)]
Auto merge of #31288 - GuillaumeGomez:error_code_tidy, r=brson

r? @steveklabnik

8 years agorustc: set MIPS cpu/features in the compiler
Jorge Aparicio [Sat, 30 Jan 2016 08:28:37 +0000 (03:28 -0500)]
rustc: set MIPS cpu/features in the compiler

cf #31303

8 years agorevert changes used for local testing
Jorge Aparicio [Sat, 30 Jan 2016 08:24:24 +0000 (03:24 -0500)]
revert changes used for local testing

8 years agoAuto merge of #30778 - fhahn:issue-21195-expect-help, r=nikomatsakis
bors [Sat, 30 Jan 2016 18:51:13 +0000 (18:51 +0000)]
Auto merge of #30778 - fhahn:issue-21195-expect-help, r=nikomatsakis

This is a PR for #21195. It changes the way unspecified `help` and `ǹote` messages are handled in compile-fail tests as suggested by @oli-obk in the issue: if there are some `note` or `help` annotations, there must be annotations for all `help` or `note` messages of this test. Maybe it makes also sense to add an option to specify that the this test should fail if there are unspecified `help` or `note` messages.

With this change, the following tests fail:

    [compile-fail] compile-fail/changing-crates.rs
    [compile-fail] compile-fail/default_ty_param_conflict_cross_crate.rs
    [compile-fail] compile-fail/lifetime-inference-give-expl-lifetime-param.rs
    [compile-fail] compile-fail/privacy1.rs
    [compile-fail] compile-fail/svh-change-lit.rs
    [compile-fail] compile-fail/svh-change-significant-cfg.rs
    [compile-fail] compile-fail/svh-change-trait-bound.rs
    [compile-fail] compile-fail/svh-change-type-arg.rs
    [compile-fail] compile-fail/svh-change-type-ret.rs
    [compile-fail] compile-fail/svh-change-type-static.rs
    [compile-fail] compile-fail/svh-use-trait.rs

I'll add the missing annotations if we decide to accept this change.

8 years agoAuto merge of #31286 - oli-obk:fix/mir_box, r=nagisa
bors [Sat, 30 Jan 2016 16:47:08 +0000 (16:47 +0000)]
Auto merge of #31286 - oli-obk:fix/mir_box, r=nagisa

the previous code generated a temporary of the inner type and assigned the box-memory to it. So if you did `let x: Box<usize> = box 5;` you got a

```rust
let var0: Box<usize>; // x
let mut tmp0: Box<usize>;
let mut tmp1: usize;
...
tmp1 = Box(usize);
(*tmp1) = const 5;
tmp0 = tmp1;
var0 = tmp0;
```

r? @nagisa

8 years agoAuto merge of #31274 - brson:nobench, r=nikomatsakis
bors [Sat, 30 Jan 2016 14:50:44 +0000 (14:50 +0000)]
Auto merge of #31274 - brson:nobench, r=nikomatsakis

I don't believe these test cases have served any purpose in years.

The shootout benchmarks are now upstreamed. A new benchmark suite
should rather be maintained out of tree.

r? @nikomatsakis

8 years agoMark test failing with msvc due to #31306 as ignore-msvc
Florian Hahn [Sat, 30 Jan 2016 13:27:12 +0000 (14:27 +0100)]
Mark test failing with msvc due to #31306 as ignore-msvc

8 years agooff by one
Oliver Schneider [Sat, 30 Jan 2016 12:40:40 +0000 (13:40 +0100)]
off by one

8 years agoAuto merge of #31305 - Manishearth:rollup, r=Manishearth
bors [Sat, 30 Jan 2016 12:32:47 +0000 (12:32 +0000)]
Auto merge of #31305 - Manishearth:rollup, r=Manishearth

- Successful merges: #31099, #31244, #31280, #31290, #31292, #31294, #31295, #31296
- Failed merges:

8 years agoRollup merge of #31296 - steveklabnik:gh31249, r=alexcrichton
Manish Goregaokar [Sat, 30 Jan 2016 12:27:17 +0000 (17:57 +0530)]
Rollup merge of #31296 - steveklabnik:gh31249, r=alexcrichton

Rustdoc will automatically wrap things in main, but this doesn't work
here.

Fixes #31249

8 years agoRollup merge of #31295 - steveklabnik:gh31266, r=alexcrichton
Manish Goregaokar [Sat, 30 Jan 2016 12:27:17 +0000 (17:57 +0530)]
Rollup merge of #31295 - steveklabnik:gh31266, r=alexcrichton

These are free functions in the text, but methods in the standard
library.

Fixes #31266

8 years agoRollup merge of #31294 - steveklabnik:gh31284, r=alexcrichton
Manish Goregaokar [Sat, 30 Jan 2016 12:27:17 +0000 (17:57 +0530)]
Rollup merge of #31294 - steveklabnik:gh31284, r=alexcrichton

This code was refactored, but the words were not

Fixes #31284

8 years agoRollup merge of #31292 - alexcrichton:osx-dtors-in-dtors-in-dtors, r=aturon
Manish Goregaokar [Sat, 30 Jan 2016 12:27:17 +0000 (17:57 +0530)]
Rollup merge of #31292 - alexcrichton:osx-dtors-in-dtors-in-dtors, r=aturon

This test has been deadlocking and causing problems on the bots basically since
its inception. Some memory safety issues were fixed in 987dc84b, but the
deadlocks remained afterwards unfortunately.

After some investigation, I've concluded that this is just a situation where OSX
is not guaranteed to run destructors. The fix in 987dc84b observed that OSX was
rewriting the backing TLS memory to its initial state during destruction while
we weren't looking, and this would have the effect of canceling the destructors
of any other initialized TLS slots.

While very difficult to pin down, this is basically what I assume is happening
here, so there doesn't seem to really be anythig we can do to ensure the test
robustly passes on OSX, so just ignore it for now.

8 years agoRollup merge of #31290 - alexcrichton:fix-powerpc64, r=brson
Manish Goregaokar [Sat, 30 Jan 2016 12:27:16 +0000 (17:57 +0530)]
Rollup merge of #31290 - alexcrichton:fix-powerpc64, r=brson

We forgot to pass down the `-m64` flag to gcc, so we were actually compiling
powerpc code which would then later fail to link!

8 years agoRollup merge of #31280 - raindev:patch-1, r=steveklabnik
Manish Goregaokar [Sat, 30 Jan 2016 12:27:16 +0000 (17:57 +0530)]
Rollup merge of #31280 - raindev:patch-1, r=steveklabnik

Perhaps, it makes more sense to link straight to [Installing on Linux or Mac](https://doc.rust-lang.org/book/getting-started.html#installing-on-linux-or-mac) and [Installing on Windows](https://doc.rust-lang.org/book/getting-started.html#installing-on-windows) sections. Platform Support section could be skipped in case of *quick* start.

8 years agoRollup merge of #31244 - tshepang:rustfmt-parse, r=nikomatsakis
Manish Goregaokar [Sat, 30 Jan 2016 12:27:16 +0000 (17:57 +0530)]
Rollup merge of #31244 - tshepang:rustfmt-parse, r=nikomatsakis

8 years agoRollup merge of #31099 - brson:relnotes, r=alexcrichton
Manish Goregaokar [Sat, 30 Jan 2016 12:27:16 +0000 (17:57 +0530)]
Rollup merge of #31099 - brson:relnotes, r=alexcrichton

8 years agoAuto merge of #30843 - jseyfried:no_per_ns, r=nikomatsakis
bors [Sat, 30 Jan 2016 10:16:55 +0000 (10:16 +0000)]
Auto merge of #30843 - jseyfried:no_per_ns, r=nikomatsakis

This commit refactors the field `Module::children` from mapping `Name` -> `NameBindings` to mapping `(Name, Namespace)` -> `NameBinding` and refactors the field `Module::import_resolutions` from mapping `Name` -> `ImportResolutionPerNamespace` to mapping `(Name, Namespace)` -> `ImportResolution`.

This allows the duplicate checking code to be refactored so that `NameBinding` no longer needs ref-counting or a RefCell (removing the need for `NsDef`).

r? @nikomatsakis

8 years agoIgnoring demo code with compilation error.
Sandeep Datta [Sat, 30 Jan 2016 08:13:02 +0000 (13:43 +0530)]
Ignoring demo code with compilation error.

8 years agorustc: Set MIPS cpu/features in the compiler
Alex Crichton [Sat, 30 Jan 2016 07:44:46 +0000 (23:44 -0800)]
rustc: Set MIPS cpu/features in the compiler

Currently any compilation to MIPS spits out the warning:

    'generic' is not a recognized processor for this target (ignoring processor)

Doesn't make for a great user experience! We don't encounter this in the normal
bootstrap because the cpu/feature set are set by the makefiles. Instead let's
just propagate these to the defaults for the entire target all the time (still
overridable from the command line) and prevent warnings from being emitted by
default.

8 years agoAuto merge of #31297 - brson:wintrip, r=alexcrichton
bors [Sat, 30 Jan 2016 07:08:38 +0000 (07:08 +0000)]
Auto merge of #31297 - brson:wintrip, r=alexcrichton

Buildbot was updated long ago to use the correct triples.

The putvar here is emitting garbage into `configure --help` so
I want it gone.

8 years agoAuto merge of #30448 - alexcrichton:llvmup, r=nikomatsakis
bors [Sat, 30 Jan 2016 00:25:44 +0000 (00:25 +0000)]
Auto merge of #30448 - alexcrichton:llvmup, r=nikomatsakis

These commits perform a few high-level changes with the goal of enabling i686 MSVC unwinding:

* LLVM is upgraded to pick up the new exception handling instructions and intrinsics for MSVC. This puts us somewhere along the 3.8 branch, but we should still be compatible with LLVM 3.7 for non-MSVC targets.
* All unwinding for MSVC targets (both 32 and 64-bit) are implemented in terms of this new LLVM support. I would like to also extend this to Windows GNU targets to drop the runtime dependencies we have on MinGW, but I'd like to land this first.
* Some tests were fixed up for i686 MSVC here and there where necessary. The full test suite should be passing now for that target.

In terms of landing this I plan to have this go through first, then verify that i686 MSVC works, then I'll enable `make check` on the bots for that target instead of just `make` as-is today.

Closes #25869

8 years agoGet tests working on MSVC 32-bit
Alex Crichton [Mon, 14 Dec 2015 23:40:43 +0000 (15:40 -0800)]
Get tests working on MSVC 32-bit

8 years agotrans: Reimplement unwinding on MSVC
Alex Crichton [Sat, 24 Oct 2015 01:18:44 +0000 (18:18 -0700)]
trans: Reimplement unwinding on MSVC

This commit transitions the compiler to using the new exception handling
instructions in LLVM for implementing unwinding for MSVC. This affects both 32
and 64-bit MSVC as they're both now using SEH-based strategies. In terms of
standard library support, lots more details about how SEH unwinding is
implemented can be found in the commits.

In terms of trans, this change necessitated a few modifications:

* Branches were added to detect when the old landingpad instruction is used or
  the new cleanuppad instruction is used to `trans::cleanup`.
* The return value from `cleanuppad` is not stored in an `alloca` (because it
  cannot be).
* Each block in trans now has an `Option<LandingPad>` instead of `is_lpad: bool`
  for indicating whether it's in a landing pad or not. The new exception
  handling intrinsics require that on MSVC each `call` inside of a landing pad
  is annotated with which landing pad that it's in. This change to the basic
  block means that whenever a `call` or `invoke` instruction is generated we
  know whether to annotate it as part of a cleanuppad or not.
* Lots of modifications were made to the instruction builders to construct the
  new instructions as well as pass the tagging information for the call/invoke
  instructions.
* The translation of the `try` intrinsics for MSVC has been overhauled to use
  the new `catchpad` instruction. The filter function is now also a
  rustc-generated function instead of a purely libstd-defined function. The
  libstd definition still exists, it just has a stable ABI across architectures
  and leaves some of the really weird implementation details to the compiler
  (e.g. the `localescape` and `localrecover` intrinsics).

8 years agotrans: Upgrade LLVM
Alex Crichton [Fri, 23 Oct 2015 05:07:19 +0000 (22:07 -0700)]
trans: Upgrade LLVM

This brings some routine upgrades to the bundled LLVM that we're using, the most
notable of which is a bug fix to the way we handle range asserts when loading
the discriminant of an enum. This fix ended up being very similar to f9d4149c
where we basically can't have a range assert when loading a discriminant due to
filling drop, and appropriate flags were added to communicate this to
`trans::adt`.

8 years agoconfigure: Remove compatibility hacks for windows triples
Brian Anderson [Fri, 29 Jan 2016 23:55:11 +0000 (15:55 -0800)]
configure: Remove compatibility hacks for windows triples

Buildbot was updated long ago to use the correct triples.

The putvar here is emitting garbage into `configure --help` so
I want it gone.

8 years agoadd support for mips(el)-unknown-linux-musl
Jorge Aparicio [Mon, 25 Jan 2016 21:23:31 +0000 (16:23 -0500)]
add support for mips(el)-unknown-linux-musl

This target covers MIPS devices that run the trunk version of OpenWRT.

The x86_64-unknown-linux-musl target always links statically to C libraries. For
the mips(el)-unknown-linux-musl target, we opt for dynamic linking (like most of
other targets do) to keep binary size down.

As for the C compiler flags used in the build system, we use the same flags used
for the mips(el)-unknown-linux-gnu target.

8 years agoAdd missings NOTE and HELP annotations to tests
Florian Hahn [Fri, 15 Jan 2016 10:57:57 +0000 (11:57 +0100)]
Add missings NOTE and HELP annotations to tests

8 years agoExpect all help/note messages are specified in a cfail test if it contains help/note...
Florian Hahn [Fri, 8 Jan 2016 11:26:09 +0000 (12:26 +0100)]
Expect all help/note messages are specified in a cfail test if it contains help/note annotations,

closes #21195

8 years agoAdd main() so that examples work
Steve Klabnik [Fri, 29 Jan 2016 22:53:35 +0000 (17:53 -0500)]
Add main() so that examples work

Rustdoc will automatically wrap things in main, but this doesn't work
here.

Fixes #31249

8 years agoMake note that this is different in std
Steve Klabnik [Fri, 29 Jan 2016 22:48:22 +0000 (17:48 -0500)]
Make note that this is different in std

These are free functions in the text, but methods in the standard
library.

Fixes #31266

8 years agoFix number of methods in guessing game
Steve Klabnik [Fri, 29 Jan 2016 22:45:03 +0000 (17:45 -0500)]
Fix number of methods in guessing game

This code was refactored, but the words were not

Fixes #31284

8 years agoUpdate release notes for 1.7
Brian Anderson [Fri, 22 Jan 2016 00:02:28 +0000 (00:02 +0000)]
Update release notes for 1.7

8 years agoRelease notes for 1.6
Brian Anderson [Tue, 19 Jan 2016 00:18:11 +0000 (00:18 +0000)]
Release notes for 1.6

8 years agoRemove src/test/bench
Brian Anderson [Fri, 29 Jan 2016 02:44:45 +0000 (18:44 -0800)]
Remove src/test/bench

I don't believe these test cases have served any purpose in years.

The shootout benchmarks are now upstreamed. A new benchmark suite
should rather be maintained out of tree.

8 years agostd: Ignore dtors_in_dtors_in_dtors on OSX
Alex Crichton [Fri, 29 Jan 2016 21:46:47 +0000 (13:46 -0800)]
std: Ignore dtors_in_dtors_in_dtors on OSX

This test has been deadlocking and causing problems on the bots basically since
its inception. Some memory safety issues were fixed in 987dc84b, but the
deadlocks remained afterwards unfortunately.

After some investigation, I've concluded that this is just a situation where OSX
is not guaranteed to run destructors. The fix in 987dc84b observed that OSX was
rewriting the backing TLS memory to its initial state during destruction while
we weren't looking, and this would have the effect of canceling the destructors
of any other initialized TLS slots.

While very difficult to pin down, this is basically what I assume is happening
here, so there doesn't seem to really be anythig we can do to ensure the test
robustly passes on OSX, so just ignore it for now.

8 years agoRemove resolve::dump_module
Jeffrey Seyfried [Thu, 28 Jan 2016 03:04:01 +0000 (03:04 +0000)]
Remove resolve::dump_module

8 years agoNits and other local improvements in resolve
Jeffrey Seyfried [Thu, 28 Jan 2016 03:03:40 +0000 (03:03 +0000)]
Nits and other local improvements in resolve

8 years agoClean up resolve_single_import
Jeffrey Seyfried [Fri, 22 Jan 2016 03:00:29 +0000 (03:00 +0000)]
Clean up resolve_single_import

8 years agoRefactor away NameBindings, NsDef, ImportResolutionPerNamespace, DuplicateCheckingMod...
Jeffrey Seyfried [Thu, 14 Jan 2016 01:42:45 +0000 (01:42 +0000)]
Refactor away NameBindings, NsDef, ImportResolutionPerNamespace, DuplicateCheckingMode, and NamespaceDefinition.