Commit Graph

82953 Commits

Author SHA1 Message Date
David Wood
c802be6f30
Added rustc_codegen_llvm to compiler documentation. 2018-08-24 13:09:34 +02:00
Isaac Woods
b24a30e94d
Remove unnecessary closure in rustc_mir/build/mod.rs 2018-08-24 11:21:15 +01:00
Nicholas Nethercote
626b2987a9 Introduce UnionIntoIdxSet and SubtractFromIdxSet traits.
They let `union()`, `union_sparse()` and `union_hybrid()` be merged.
Likewise for subtract()`, `subtract_sparse()` and `subtract_hybrid()`.
2018-08-24 19:51:09 +10:00
Nicholas Nethercote
180052d5f7 Rename universe_size as domain_size.
Because `domain` is a more obvious term than `universe` for this
concept.
2018-08-24 19:51:09 +10:00
kennytm
d13c61208a
Rollup merge of #53563 - matthiaskrgr:String, r=varkor
use String::new() instead of String::from(""), "".to_string(), "".to_owned() or "".into()
2018-08-24 16:44:35 +08:00
kennytm
714e5b3c46
Rollup merge of #53562 - varkor:bastion-of-the-turbofish, r=nagisa
Lament the invincibility of the Turbofish

Here a test case is added to ensure that any others attempting to drive the Turbofish to extinction have second thoughts. Previously the [entire test suite would succeed](https://github.com/rust-lang/rust/pull/53511) if generic arguments were accepted without disambiguation, making for [confusing and heartbreaking circumstances](https://github.com/rust-lang/rfcs/pull/2527).
2018-08-24 16:44:34 +08:00
kennytm
7f396bad9e
Rollup merge of #53559 - Dylan-DPC:fix/missing-doc-lint, r=kennytm
add macro check for lint

Fixes #53537
2018-08-24 16:44:32 +08:00
kennytm
973428d522
Rollup merge of #53503 - kornelski:master, r=dtolnay
Discourage overuse of mem::forget

Some uses of `mem::forget` have been replaced by better methods of `Box`, so I've removed obsoleted use-cases from these docs.

I've removed emphasis on leaking, because it's not obvious `mem::forget` does not guarantee leaking of memory: memory of stack-allocated objects and values partially moved out of `Box` will still be freed. That's a potential error when used to pass objects to FFI, so it's better to direct users to `Box::into_raw` instead.
2018-08-24 16:44:31 +08:00
kennytm
ab5a71b034
Rollup merge of #53311 - RalfJung:windows-mutex, r=retep998
Window Mutex: Document that we properly initialize the SRWLock

See https://github.com/rust-lang/rust/issues/35836
2018-08-24 16:44:30 +08:00
Sergio Benitez
ed0bd38cac Stabilize 'attr_literals' feature. 2018-08-23 19:06:07 -07:00
Vadim Petrochenkov
77f2a2fe35 Turn the error for module-relative access to macro-expanded macro_export macros into a deprecation lint 2018-08-24 02:51:41 +03:00
Vadim Petrochenkov
7a8b726811 Add a test for reset expansion info 2018-08-24 02:50:34 +03:00
Vadim Petrochenkov
6fdb400ff2 Revert "hygiene: Make sure expansion info is set at most once for a given Mark"
This reverts commit b15785b671.
2018-08-24 02:21:52 +03:00
bors
63d66494af Auto merge of #53638 - flip1995:clippy, r=nrc
Update clippy

r? @oli-obk @Manishearth
2018-08-23 22:52:29 +00:00
Guillaume Gomez
61fc7f18c3 Add struct keyword doc 2018-08-23 23:50:05 +02:00
flip1995
cd8fcb6140
Update clippy again 2018-08-23 23:31:55 +02:00
Andre Bogus
25a83e3a88 Use SmallVec for SmallCStr 2018-08-23 23:13:14 +02:00
Niko Matsakis
46bb36da80 implicit_infer: apply rustfmt 2018-08-23 17:05:38 -04:00
bors
5ce5e08606 Auto merge of #53588 - tristanburgess:52985_diagnostics_no_concrete_type_behind_existential_type, r=oli-obk
52985 diagnostics no concrete type behind existential type

@oli-obk FYI. See below for new cycle error generated.

```rust
error[E0391]: cycle detected when processing `Foo`
 --> /dev/staging/existential_type_no_concrete_type_nouse_potential.rs:3:1
  |
3 | existential type Foo: Copy;
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |
note: ...which requires processing `bar`...
 --> /dev/staging/existential_type_no_concrete_type_nouse_potential.rs:6:23
  |
6 |   fn bar(x: Foo) -> Foo {
  |  _______________________^
7 | |     x
8 | | }
  | |_^
  = note: ...which again requires processing `Foo`, completing the cycle

error: aborting due to previous error

For more information about this error, try `rustc --explain E0391`.
```
2018-08-23 20:34:12 +00:00
Jorge Aparicio
40a38b0164 update the unstable book 2018-08-23 21:44:45 +02:00
Jorge Aparicio
363db14704 fix new ui test 2018-08-23 21:43:55 +02:00
Jorge Aparicio
ca03f86aad fix tidy 2018-08-23 20:58:55 +02:00
Jorge Aparicio
a774c81f98 add #[panic_handler]; deprecate #[panic_implementation] 2018-08-23 20:58:55 +02:00
Niko Matsakis
cb3324851c use usize for self instead of ty 2018-08-23 14:36:26 -04:00
toidiu
3860eabbb6 fix for late-bound regions 2018-08-23 14:35:59 -04:00
Guillaume Gomez
2cc2e01e04 Add missing fmt examples 2018-08-23 20:20:58 +02:00
dylan_DPC
747722e444 fix testcase 2018-08-23 23:21:54 +05:30
bors
54d82d0880 Auto merge of #53571 - MaloJaffre:vecdeque-emergency, r=RalfJung
Fix unsoundness for VecDeque

 See individual commit for more details.

r? @RalfJung.

Fixes https://github.com/rust-lang/rust/issues/53566, fixes https://github.com/rust-lang/rust/issues/53529
2018-08-23 17:13:44 +00:00
Bernardo Meurer
e07c1542ac
Fixed multi-line function signatures 2018-08-23 09:34:21 -07:00
Bernardo Meurer
6ca0384755
Small style fixes 2018-08-23 09:26:37 -07:00
Bernardo Meurer
67a8666ac8
More tidy fixes to CTFE 2018-08-23 09:21:40 -07:00
Bernardo Meurer
46b885f62b
Fix stylistic mistakes 2018-08-23 08:57:42 -07:00
Bernardo Meurer
22d3f66945
Fixup long code lines 2018-08-23 08:55:42 -07:00
Bernardo Meurer
35f25bfef3
Reflow and fixup comments 2018-08-23 08:54:23 -07:00
Bernardo Meurer
37db3db53d
Fixed long strings 2018-08-23 08:52:31 -07:00
Bernardo Meurer
22beeb4cab
Add license header to CTFE/MIRI 2018-08-23 08:51:44 -07:00
Bernardo Meurer
65544e5109
Removed librustc/mir/interpret and librustc_mir/interpreter from tidy skip list 2018-08-23 08:51:39 -07:00
Kazuyoshi Kato
1f441a0905 Check null-able variables before using them 2018-08-23 08:15:23 -07:00
bors
e5284b0b57 Auto merge of #53384 - gootorov:use-servo-smallvec, r=michaelwoerister
Use optimized SmallVec implementation

This PR replaces current SmallVec implementation with the one from the Servo project.

Closes https://github.com/rust-lang/rust/issues/51640

r? @Mark-Simulacrum
2018-08-23 14:40:22 +00:00
Kornel
e7709b3d44 Discourage overuse of mem::forget 2018-08-23 15:01:28 +01:00
flip1995
65c0ebd8ab
Update clippy 2018-08-23 16:00:04 +02:00
Corey Farwell
9e0ff24b6d Prefer .nth(n) over .skip(n).next().
Found by clippy.
2018-08-23 09:35:49 -04:00
Kyle Simpson
85a05d1815 Light restructuring. 2018-08-23 13:12:53 +01:00
bors
35bf1ae257 Auto merge of #52602 - scottmcm:tryblock-expr, r=nikomatsakis
Implement try block expressions

I noticed that `try` wasn't a keyword yet in Rust 2018, so...

~~Fix​es https://github.com/rust-lang/rust/issues/52604~~ That was fixed by PR https://github.com/rust-lang/rust/pull/53135
cc https://github.com/rust-lang/rust/issues/31436 https://github.com/rust-lang/rust/issues/50412
2018-08-23 11:46:24 +00:00
Niko Matsakis
a59584a6ff use TypeOp machinery for outlives_bounds
Fixes #52992
2018-08-23 07:38:47 -04:00
Niko Matsakis
89574a6fc7 resolve type variables in the custom type op pathway 2018-08-23 07:38:47 -04:00
Nicholas Nethercote
002f03b654 Make SparseBitMatrix a bit lazier.
Currently when a row is instantiated in SparseBitMatrix, any missing
rows prior to it are also fully instantiated.

This patch changes things so that those prior rows are minimally
instantiated (with a `None`). This avoids a decent number of allocations
in NLL, speeding up several benchmarks by up to 0.5%.

The patch also removes two unused methods, `len()` and
`iter_enumerated()`.
2018-08-23 18:41:55 +10:00
bors
827e57c2f6 Auto merge of #53459 - petrochenkov:stabmore, r=nrc
Stabilize a few secondary macro features

- `tool_attributes` - closes https://github.com/rust-lang/rust/issues/44690
- `proc_macro_path_invoc` - this feature was created due to issues with tool attributes (https://github.com/rust-lang/rust/issues/51277), those issues are now fixed (https://github.com/rust-lang/rust/pull/52841)
- partially `proc_macro_gen` - this feature was created due to issue https://github.com/rust-lang/rust/issues/50504, the issue is now fixed (https://github.com/rust-lang/rust/pull/51952), so proc macros can generate modules. They still can't generate `macro_rules` items though due to unclear hygiene interactions.
2018-08-23 08:38:22 +00:00
Matthias Krüger
ede1f7d2a5 use String::new() instead of String::from(""), "".to_string(), "".to_owned() or "".into() 2018-08-23 10:14:52 +02:00
Igor Gutorov
4d81fe9243 Use optimized SmallVec implementation 2018-08-23 10:45:53 +03:00