Commit Graph

135695 Commits

Author SHA1 Message Date
bors
f3eead1c69 Auto merge of #80453 - petrochenkov:nocfail, r=Mark-Simulacrum
Remove `compile-fail` test suite

By moving all of its tests to `ui` test suite.
Now we have directives like `// dont-check-compiler-stderr` that allow to disable `.stderr` comparison for platform-dependent tests without introducing a whole new test suite.
2020-12-29 23:20:46 +00:00
Aaron Hill
6bef37c841
Remove unnecessary semicolon from Clippy test 2020-12-29 17:16:04 -05:00
Ralf Jung
95aed7ab3b Miri: make size/align_of_val work for dangling raw ptrs 2020-12-29 22:46:17 +01:00
Aaron Hill
4c4700d9e5
Remove unnecessary semicolon from Rustdoc-generated code 2020-12-29 16:30:02 -05:00
Aaron Hill
21ed141b94
Remove trailing semicolon in librustdoc 2020-12-29 16:30:02 -05:00
Aaron Hill
c857cbeb06
Lint on redundant trailing semicolon after item
We now lint on code like this:

```rust
fn main() {
    fn foo() {};
    struct Bar {};
}
```

Previously, this caused warnings in Cargo, so it was disabled.
2020-12-29 16:30:02 -05:00
Matthias Krüger
0c3af22e08 don't redundantly repeat field names 2020-12-29 22:26:58 +01:00
CAD97
81685e9ad8 Do not create dangling &T in Weak<T>::drop 2020-12-29 15:42:41 -05:00
Vadim Petrochenkov
4d2d0bad4e Remove compile-fail test suite 2020-12-29 23:39:56 +03:00
Matthias Krüger
17a8c1017f don't clone copy types 2020-12-29 19:40:03 +01:00
LingMan
7a41532ef9 More uses of the matches! macro 2020-12-29 17:18:52 +01:00
Ralf Jung
51cec58040 fix a comment 2020-12-29 16:32:38 +01:00
Guillaume Gomez
893c626d06 Use sans-serif font for the "all items" page links 2020-12-29 15:56:52 +01:00
Aaron Hill
530a629635
Remove pretty-print/reparse hack, and add derive-specific hack 2020-12-29 09:36:42 -05:00
C
206b2ca61e test: updated expected Vec src path 2020-12-29 14:03:30 +00:00
C
f7a6f0cae3 docs: fixing references 2020-12-29 14:03:30 +00:00
C
80f10d7aa7 fix: moved import into #[cfg(test)] 2020-12-29 14:03:30 +00:00
C
2de8356f60 style: applying Rust style 2020-12-29 14:03:30 +00:00
C
6002b280f1 refactor: removing // ignore-tidy-filelength 2020-12-29 14:03:30 +00:00
C
bd49a60f29 refactor: moved SpecExtend into spec_extend.rs 2020-12-29 14:03:30 +00:00
C
d24a27797d refactor: moving SpecFromIter into spec_from_iter.rs 2020-12-29 14:03:30 +00:00
C
56d82b3dcc refactor: moved SpecFromIterNested to spec_from_iter_nested.rs 2020-12-29 14:03:30 +00:00
C
9e08ce7190 refactor: moved InPlaceDrop into in_place_drop.rs 2020-12-29 14:03:30 +00:00
C
a3f3fc5aed refactor: moved SetLenOnDrop to set_len_on_drop 2020-12-29 14:03:30 +00:00
C
a2f4bc0d18 refactor: moved SpecFromElem to spec_from_elem.rs 2020-12-29 14:03:30 +00:00
C
dc46013248 refactor: moved PartialEq into partial_eq 2020-12-29 14:03:30 +00:00
C
5ac6709b95 refactor: moving SourceIterMarker into source_iter_marker.rs 2020-12-29 14:03:30 +00:00
C
840c4e2873 refactor: moved IsZero into is_zero.rs 2020-12-29 14:03:30 +00:00
C
2a1248976a refactor: moving AsIntoIter into into_iter.rs 2020-12-29 14:03:29 +00:00
C
93613901d0 refactor: moved IntoIter into into_iter.rs 2020-12-29 14:03:29 +00:00
C
2580822b91 refactor: moved Vec impl Cow into cow.rs 2020-12-29 14:03:29 +00:00
C
6bf9608f9f refactor: moving Drain into drain.rs 2020-12-29 14:03:29 +00:00
C
17593f258b refactor: moving Splice into splice.rs 2020-12-29 14:03:29 +00:00
C
434e5d1422 refactor: moving DrainFilter into drain_filter.rs 2020-12-29 14:03:29 +00:00
C
5182776c6c refactor: moving vec.rs to vec/mod.rs 2020-12-29 14:03:29 +00:00
bors
158f8d034b Auto merge of #80014 - jyn514:box-item-kind, r=nnethercote
[rustdoc] Box ItemKind to reduce the size of `Item`

This brings the size of `Item` from

```
[src/librustdoc/lib.rs:103] std::mem::size_of::<Item>() = 536
```

to

```
[src/librustdoc/lib.rs:103] std::mem::size_of::<Item>() = 136
```

This is an alternative to https://github.com/rust-lang/rust/pull/79967; I don't think it makes sense to make both changes.

Helps with #79103.
2020-12-29 10:41:01 +00:00
BlackHoleFox
5449a42a1c Fix small typo in time comment 2020-12-29 02:10:29 -06:00
bors
e2a2592885 Auto merge of #79084 - simonvandel:instcombine-perf, r=oli-obk
Small perf changes for InstCombine
2020-12-29 06:21:18 +00:00
Joshua Nelson
5fce0dd787 Add static assertion for the size of ItemKind 2020-12-29 00:43:25 -05:00
Ikko Ashimine
02db77c2d1
Fix typo in ffi-pure.md
accesing -> accessing
2020-12-29 13:37:21 +09:00
LingMan
3dae414cb6 Use Option::map_or instead of open coding it 2020-12-29 04:27:37 +01:00
bors
d75f48e04d Auto merge of #80449 - m-ou-se:rollup-kp2e5n8, r=m-ou-se
Rollup of 11 pull requests

Successful merges:

 - #80383 (clarify wrapping ptr arithmetic docs)
 - #80390 (BTreeMap: rename the area access methods)
 - #80393 (Add links to the source for the rustc and rustdoc books.)
 - #80398 (Use raw version of align_of in rc data_offset)
 - #80402 (Document `InferTy` & co.)
 - #80403 (fix: small typo error in chalk/mod.rs)
 - #80410 (rustdoc book: fix example)
 - #80419 (Add regression test for #80375)
 - #80430 (Add "length" as doc alias to len methods)
 - #80431 (Add "chr" as doc alias to char::from_u32)
 - #80448 (Fix stabilization version of deque_range feature.)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2020-12-29 00:16:54 +00:00
Tomasz Miąsko
5718cc2f9b Make forget intrinsic safe 2020-12-29 00:00:00 +00:00
Tyler Mandry
8041ccff2c
Add llvm-libunwind change to bootstrap CHANGELOG
From #77703.
2020-12-28 15:57:53 -08:00
Ralf Jung
4a90a58c34 make more matches exhaustive 2020-12-28 23:29:16 +01:00
Camelid
8d5dc8c2f0
Add missing commas to rustc_ast_pretty::pp docs 2020-12-28 14:23:20 -08:00
Simon Vandel Sillesen
0010fc8fec use exhaustive pattern match to prevent future bugs 2020-12-28 23:19:35 +01:00
Ralf Jung
c177e68015 merge two match'es for more exhaustiveness 2020-12-28 22:44:04 +01:00
Ralf Jung
122e91c4fb promotion: factor some common code into validate_ref 2020-12-28 22:09:08 +01:00
Arlie Davis
2f584229d4 Improvements to NatVis support
NatVis files describe how to display types in some Windows debuggers,
such as Visual Studio, WinDbg, and VS Code.

This commit makes several improvements:

* Adds visualizers for Rc<T>, Weak<T>, and Arc<T>.

* Changes [size] to [len], for consistency with the Rust API.
  Visualizers often use [size] to mirror the size() method on C++ STL
  collections.

* Several visualizers used the PVOID and ULONG typedefs. These are part
  of the Windows API; they are not guaranteed to always be defined in a
  pure Rust DLL/EXE. I converted PVOID to `void*` and `ULONG` to
  `unsigned long`.

* Cosmetic change: Removed {} braces around the visualized display
  for `Option` types. They now display simply as `Some(value)` or
  `None`, which reflects what is written in source code.

* The visualizer for `alloc::string::String` makes assumptions about
  the layout of `String` (it casts `String*` to another type), rather
  than using symbolic expressions. This commit changes the visualizer
  so that it simply uses symbolic expressions to access the string
  data and string length.
2020-12-28 12:14:49 -08:00