Commit Graph

65692 Commits

Author SHA1 Message Date
Jeremy Soller
21f2ace8cf Update mod.rs 2017-07-12 20:48:04 -06:00
Jeremy Soller
362dd8a986 Update fs.rs 2017-07-12 20:40:43 -06:00
Jeremy Soller
bd9428a46b Update mod.rs 2017-07-12 20:39:02 -06:00
Jeremy Soller
0d617ce4c9 Update tcp.rs 2017-07-12 20:37:18 -06:00
Ty Coghlan
250346128b Updated docker images to factor out common scripts 2017-07-12 21:25:36 -04:00
Mark Simulacrum
b7a4c54413 Change language in Travis configuration to shell
In theory, this will give us more disk space to work with and unblock the queue.
2017-07-12 16:34:18 -06:00
Ralf Jung
0bbc315830 please tidy by shortening lines 2017-07-12 13:19:58 -07:00
Ralf Jung
e1ad1909db rename trait to conform with 'getter trait' pattern 2017-07-12 13:15:29 -07:00
Ralf Jung
66fce33ecb overload the mir ty methods to make them more ergonomic to use 2017-07-12 12:59:05 -07:00
Havvy
a01c91c8bc Document error coercion to false in path-ext methods + see also sections 2017-07-12 12:05:40 -07:00
bors
f85579d4a2 Auto merge of #43181 - Mark-Simulacrum:rollup, r=Mark-Simulacrum
Rollup of 8 pull requests

- Successful merges: #42670, #42826, #43000, #43011, #43098, #43100, #43136, #43137
- Failed merges:
2017-07-12 17:04:14 +00:00
Lee Bousfield
a301f84b6a
Use try_with for with implementation 2017-07-12 10:55:39 -06:00
steveklabnik
38df82d2f2 Tweak the CoC to point to the online version. 2017-07-12 12:42:54 -04:00
steveklabnik
2dcbef793f Add the Code of Conduct to the repository.
https://github.com/rust-lang/rust/community currently shows that we have
no code of conduct. This will make it understand.

This is an exact copy of the page on the website.
2017-07-12 12:34:29 -04:00
Adolfo Ochagavía
f86e433b67 Add regression tests to ensure stable drop order 2017-07-12 16:14:47 +02:00
Mark Simulacrum
388fce9dab Rollup merge of #43137 - ollie27:stab, r=aturon
Correct some stability attributes

These show up in rustdoc so need to be correct.
2017-07-12 06:58:49 -06:00
Mark Simulacrum
cc20ab1f25 Rollup merge of #43136 - jgallag88:bufWriterDocs, r=steveklabnik
Add warning to BufWriter documentation

When using `BufWriter`, it is very easy to unintentionally ignore errors, because errors which occur when flushing buffered data when the `BufWriter` is dropped are ignored. This has been noted in a couple places:  #32677, #37045.

There has been some discussion about how to fix this problem in #32677, but no solution seems likely to land in the near future. For now, anyone who wishes to have robust error handling must remember to manually call `flush()` on a `BufWriter` before it is dropped.  Until a permanent fix is in place, it seems worthwhile to add a warning to that effect to the documentation.
2017-07-12 06:58:48 -06:00
Mark Simulacrum
6aeb0f0b2e Rollup merge of #43100 - ids1024:stat2, r=aturon
Redox: add stat methods(); support is_symlink()
2017-07-12 06:58:47 -06:00
Mark Simulacrum
2510116944 Rollup merge of #43098 - alexcrichton:more-proc-macro, r=jseyfried
Add `isize` and `usize` constructors to Literal

This commit fills out the remaining integer literal constructors on the
`proc_macro::Literal` type with `isize` and `usize`. (I think these were just
left out by accident)
2017-07-12 06:58:46 -06:00
Mark Simulacrum
e5288c9d6c Rollup merge of #43011 - qnighy:unsized-tuple-impls, r=aturon
Implement Eq/Hash/Debug etc. for unsized tuples.

As I mentioned in [the comment in #18469](https://github.com/rust-lang/rust/issues/18469#issuecomment-306767422), the implementations of `PartialEq`, `Eq`, `PartialOrd`, `Ord`, `Debug`, `Hash` can be generalized to unsized tuples.

This is consistent with the `derive` behavior for unsized structs.

```rust
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Debug, Default, Hash)]
struct MyTuple<X, Y, Z: ?Sized>(X, Y, Z);

fn f(x: &MyTuple<i32, i32, [i32]>) {
    x == x;
    x < x;
    println!("{:?}", x);
}
```

Questions:

- Need an RFC?
- Need a feature gate? I don't think it does because the unsized tuple coercion #42527 is feature-gated.
- I changed `builder.field($name);` into `builder.field(&$name);` in the `Debug` implementation to pass compilation. This won't affect the behavior because `Debug for &'a T` is a mere redirection to `Debug for T`. However, I don't know if it affects code size / performance.
2017-07-12 06:58:45 -06:00
Mark Simulacrum
1a7dc0a2cb Rollup merge of #43000 - estebank:on-unimplemented-path, r=arielb1
`rustc_on_unimplemented` supports referring to trait

Add support to `rustc_on_unimplemented` to reference the full path of
the annotated trait. For the following code:

```rust
pub mod Bar {
    #[rustc_on_unimplemented = "test error `{Self}` with `{Bar}` `{Baz}` `{Quux}` in `{Foo}`"]
    pub trait Foo<Bar, Baz, Quux> {}
}
```

the error message will be:

```
test error `std::string::String` with `u8` `_` `u32` in `Bar::Foo`
```
2017-07-12 06:58:44 -06:00
Mark Simulacrum
0926f9b72f Rollup merge of #42826 - Yorwba:type-mismatch-same-absolute-paths, r=arielb1
Note different versions of same crate when absolute paths of different types match.

The current check to address #22750 only works when the paths of the mismatched types relative to the current crate are equal, but this does not always work if one of the types is only included through an indirect dependency. If reexports are involved, the indirectly included path can e.g. [contain private modules](https://github.com/rust-lang/rust/issues/22750#issuecomment-302755516).

This PR takes care of these cases by also comparing the *absolute* path, which is equal if the type hasn't moved in the module hierarchy between versions. A more coarse check would be to compare only the crate names instead of full paths, but that might lead to too many false positives.

Additionally, I believe it would be helpful to show where the differing crates came from, i.e. the information in `rustc::middle::cstore::CrateSource`, but I'm not sure yet how to nicely display all of that, so I'm leaving it to a future PR.
2017-07-12 06:58:44 -06:00
Mark Simulacrum
500518ab72 Rollup merge of #42670 - dns2utf8:panic_return_code, r=steveklabnik
Add hint about the return code of panic!

I hope the link works on all cases, since the `unreachable` doc is copied to `std::` as well.
2017-07-12 06:58:43 -06:00
Ariel Ben-Yehuda
ecf62e4cdc [LLVM] Avoid losing the !nonnull attribute in SROA
This still does not work on 32-bit archs because of an LLVM limitation,
but this is only an optimization, so let's push it on 64-bit only for now.

Fixes #37945
2017-07-12 14:38:49 +03:00
bors
b2b19ec92e Auto merge of #42897 - Mark-Simulacrum:pretty-print-refactor, r=jseyfried
Refactor pretty printing slightly

This doesn't introduce any functional changes (that I'm aware of). The primary intention here is to clean up the code a little. Each commit is intended to stand alone, reviewing commit-by-commit may be easiest.
2017-07-12 11:10:37 +00:00
Niko Matsakis
4f030d04f4 integrate anon dep nodes into trait selection 2017-07-12 06:56:54 -04:00
bors
8bba5ad309 Auto merge of #43107 - michaelwoerister:less-span-info-in-debug, r=nikomatsakis
incr.comp.: Don't include span information in the ICH of type definitions

This should improve some of the `regex` tests on perf.rlo. Not including spans into the ICH is harmless until we also cache warnings. To really solve the problem, we need to do more refactoring (see #43088).

r? @nikomatsakis
2017-07-12 08:45:39 +00:00
Oliver Schneider
a260baae7e Reintroduce expansion info for proc macros 1.1 2017-07-12 09:47:04 +02:00
bors
8ac29bdd11 Auto merge of #42697 - Mark-Simulacrum:take-limit, r=aturon
Allow setting the limit on std::io::Take.

Fixes https://github.com/rust-lang/rust/issues/27269.
2017-07-12 06:23:38 +00:00
bors
d1f1f86d7f Auto merge of #42936 - steveklabnik:update-mdbook, r=alexcrichton
update crate dependencies

I wanted to update mdbook's version. This ended up updating a bunch of other stuff too.

I am not sure if updating this much stuff is considered a Good Idea or not; happy to figure out how to make it smaller if someone can help me figure out how to use x.py to do it.
2017-07-12 04:07:32 +00:00
steveklabnik
4871dba5d4 update crate dependencies
I wanted to update mdbook's version. This ended up updating a bunch of other stuff too.
2017-07-11 21:18:44 -04:00
bors
cd71ea7338 Auto merge of #43056 - ids1024:nofollow2, r=burntsushi
Redox: Use O_NOFOLLOW for lstat()
2017-07-12 00:49:51 +00:00
Ralf Jung
62b2e5446d Refactor: {Lvalue,Rvalue,Operand}::ty only need the locals' types, not the full &Mir 2017-07-11 16:38:16 -07:00
Ian Douglas Scott
51260f4a6d
Redox: Use O_NOFOLLOW for lstat() 2017-07-11 15:05:17 -07:00
bors
b360b44ecf Auto merge of #43083 - kennytm:fix-42434-custom-stdxxx-normalization, r=nikomatsakis
compilertest (UI test): Support custom normalization.

Closes #42434.

Adds this header for UI tests:

```rust
// normalize-stderr-32bit: "fn() (32 bits)" -> "fn() ($PTR bits)"
```

It will normalize the `stderr` output on 32-bit platforms, by replacing all instances of `fn() (32 bits)` by `fn() ($PTR bits)`.

Extends the UI tests in #42304 and #41968 to 32-bit targets.

r? @nikomatsakis
2017-07-11 22:02:20 +00:00
Alex Burka
f9f4707469 let #[allow_internal_unstable] cover :vis 2017-07-11 20:31:22 +00:00
Alex Burka
8e7c4888b7 stage0 fallback 2017-07-11 20:29:16 +00:00
Alex Burka
8cce5bc7ab use :vis in thread_local! 2017-07-11 20:27:55 +00:00
Alex Burka
b6a2d7e822 support pub(restricted) in thread_local! 2017-07-11 20:27:54 +00:00
Mark Simulacrum
40f03a1e0d Refactor call_with_pp functions to not take a payload.
This is needless noise; the closure we take is FnOnce, so move || {} is
fine to pass other parameters necessary.
2017-07-11 12:09:25 -06:00
Mark Simulacrum
0343136805 Make a few functions non-public 2017-07-11 12:09:25 -06:00
Mark Simulacrum
16b486ce6e Refactor cur_cmnt_and_lit away.
The literal index was increased in only next_lit, so it isn't
necessary: code now uses an iterator. The cur_cmnt field is also moved
to be increased in print_comment instead of after each call to
print_comment.
2017-07-11 12:09:25 -06:00
Mark Simulacrum
bac4bb9613 Refactor methods onto Printer struct.
No (intentional) changes to behavior. This is intended to avoid the
anti-pattern of having to import individual methods throughout code.
2017-07-11 12:09:19 -06:00
bors
9475ae477a Auto merge of #43116 - alexcrichton:probestack, r=sfackler
Update compiler_builtins submodule for probestack fix

Closes #43102
2017-07-11 17:52:42 +00:00
bors
1475e2c923 Auto merge of #42388 - tschottdorf:projty-substs, r=nikomatsakis
Downgrade ProjectionTy's TraitRef to its substs

Addresses the second part of #42171 by removing the `TraitRef` from
`ProjectionTy`, and directly storing its `Substs`.

Closes #42171.
2017-07-11 15:14:32 +00:00
Lee Bousfield
8b5549defb
Fix @alexcrichton comments 2017-07-11 11:04:19 -04:00
Stefan Schindler
133c1bc9ac Wrap long line 2017-07-11 16:45:39 +02:00
Tobias Schottdorf
687ee7fee4 Downgrade ProjectionTy's TraitRef to its substs
Addresses the second part of #42171 by removing the `TraitRef` from
`ProjectionTy`, and directly storing its `Substs`.

Closes #42171.
2017-07-11 10:33:09 -04:00
Mark Simulacrum
7109d03db5 Allow setting the limit on std::io::Take. 2017-07-11 06:27:37 -06:00
Simon Sapin
a148f5ba24 Enable profiler on "alternate" builds
This hopefully fixes #42967 and #43085.
2017-07-11 14:01:04 +02:00