Commit graph

154608 commits

Author SHA1 Message Date
Cameron Steffen
5d3fc6fc08 Deny warnings in test modules 2021-09-08 08:21:06 -05:00
Guillaume Gomez
021b8ff8bd Add tests to ensure that <table> don't break doc blocks width anymore 2021-09-08 15:09:47 +02:00
Guillaume Gomez
32188d77ed Wrap <table> elements into <div> to prevent breaking layout and width 2021-09-08 15:08:11 +02:00
bors
c9db3e0fbc Auto merge of #87489 - bdalrhm:rustdoc-line-num, r=CraftSpider
`rustdoc`: compute correct line number for indented rust code blocks.

This PR fixes a bug in `rustdoc` where it computes the wrong line number for indented rust code blocks (and subsequent blocks) it finds in markdown strings. To fix this issue, we decrement the line number if we find characters between the code block and the preceding line ending. I noticed this issue as I was trying to use `rustdoc` to extract examples from The Rust Reference and run them through the [Rust Model Checker](https://github.com/model-checking/rmc).
2021-09-08 12:55:15 +00:00
Cameron Steffen
8c05a15f0a
Use binary-dep-depinfo to resolve UI dependencies 2021-09-08 11:13:45 +02:00
Cameron Steffen
ffe21e58a0
Remove unused dependencies 2021-09-08 11:13:44 +02:00
bors
5458358461 Auto merge of #7644 - flip1995:rustup, r=flip1995
Rustup

r? `@ghost`

changelog: none
2021-09-08 09:00:54 +00:00
flip1995
563a00b2a0
Bump Clippy Version -> 0.1.57 2021-09-08 10:59:04 +02:00
flip1995
3cb1d283d6
Bump nightly version -> 2021-09-08 2021-09-08 10:58:51 +02:00
flip1995
4962608ca6
Merge remote-tracking branch 'upstream/master' into rustup 2021-09-08 10:51:27 +02:00
bors
f35678401c Auto merge of #7607 - dswij:mut-range-bound-break, r=flip1995
`mut_range_bound` check for immediate break after mutation

closes #7532

`mut_range_bound` ignores mutation on range bounds that is placed immediately before break. Still warns if the break is not always reachable.

changelog: [`mut_range_bound`] ignore range bound mutations before immediate break
2021-09-08 08:14:17 +00:00
David Carlier
ec4a9da868 update of the CI freebsd toolchain
adding libproctsta, for the upcoming libc update.
2021-09-08 08:41:22 +01:00
bors
434cb437b5 Auto merge of #86943 - ptrojahn:suggest_derive, r=estebank
Suggest deriving traits if possible

This only applies to builtin derives as I don't think there is a
clean way to get the available derives in typeck.

Closes #85851
2021-09-08 07:27:41 +00:00
bors
72969f6526 Auto merge of #88061 - jackh726:genericbound-cleanup, r=estebank
Remove `hir::GenericBound::Unsized`

Rather than "moving" the `?Sized` bounds to the param bounds, just also check where clauses in `astconv`. I also did some related cleanup here, but that's not strictly neccesary. Also going to do a perf run here.

r? `@estebank`
2021-09-08 04:00:58 +00:00
dswij
dc6f7dc6bf Add known problems to mut_range_bound docs 2021-09-08 11:00:27 +08:00
dswij
7515d9c6f7 Update test output for mut_range_bound 2021-09-08 10:41:37 +08:00
dswij
8fbf75e0f9 mut_range_bound to check for immediate break from loop 2021-09-08 10:41:37 +08:00
dswij
290fb8de66 Add additional test for broken loop in mut_range_bound 2021-09-08 10:41:37 +08:00
bors
0d0d2fe182 Auto merge of #88477 - sexxi-goose:issue-88476, r=nikomatsakis
2229: Don't move out of drop type

Fixes #88476

r? `@nikomatsakis`
2021-09-08 00:58:33 +00:00
jackh726
890de33e4f Fix duplicate error 2021-09-07 18:51:24 -04:00
jackh726
af9de99f12 Detect stricter constraints on gats where clauses in impls vs trait 2021-09-07 18:30:58 -04:00
jackh726
22ef04e22f A bit of cleanup to astconv 2021-09-07 18:25:57 -04:00
jackh726
216906fb75 Change is_unsized to add_implicitly_sized 2021-09-07 18:08:46 -04:00
jackh726
f1f1d56d93 Don't move ?Trait bounds to param bounds if they're in where clauses 2021-09-07 18:08:46 -04:00
jackh726
2eaf9fe364 Static assert size of GenericBoun to ensure size doesn't change 2021-09-07 17:53:43 -04:00
Augie Fackler
484b79b950 RustWrapper: just use the *AtIndex funcs directly
Otherwise we're kind of reimplementing the inverse of the well-named
methods, and that's not a direction we want to go.
2021-09-07 16:15:02 -04:00
danakj
2a687deee8 Move documentation to the unstable book 2021-09-07 15:41:30 -04:00
danakj
ce35f8ec56 remap-cwd-prefix 2021-09-07 15:41:30 -04:00
Augie Fackler
532bb80f7f RustWrapper: avoid deleted unclear attribute methods
These were deleted in https://reviews.llvm.org/D108614, and in C++ I
definitely see the argument for their removal. I didn't try and
propagate the changes up into higher layers of rustc in this change
because my initial goal was to get rustc working against LLVM HEAD
promptly, but I'm happy to follow up with some refactoring to make the
API on the Rust side match the LLVM API more directly (though the way
the enum works in Rust makes the API less scary IMO).

r? @nagisa cc @nikic
2021-09-07 15:30:42 -04:00
Camille GILLOT
c5fc2609f0 Rename rustc_mir to rustc_const_eval. 2021-09-07 20:46:26 +02:00
bors
fdf65053e9 Auto merge of #88724 - Mark-Simulacrum:bump-rls, r=Mark-Simulacrum
Bump RLS submodule

r? `@Mark-Simulacrum`
2021-09-07 18:31:03 +00:00
Camille GILLOT
fd9c04fe32 Move the dataflow framework to its own crate. 2021-09-07 19:57:07 +02:00
Camille GILLOT
81a600b6b7 Move monomorphize code to its own crate. 2021-09-07 19:53:04 +02:00
Mingwei Samuel
f8cbb1935c
Fix typo in const_generics replaced with adt_const_params note 2021-09-07 09:27:30 -07:00
bors
69c4aa2901 Auto merge of #88710 - Mark-Simulacrum:tyvid-idx, r=jackh726
Use index newtyping for TyVid

This is useful for using TyVid in types like VecGraph, and just otherwise seems like a small win.
2021-09-07 15:28:34 +00:00
Mark Rousskov
c13808fb77 Bump RLS submodule 2021-09-07 11:16:31 -04:00
Waffle
efeb461873 Make UnsafeCell::get_mut const 2021-09-07 16:41:15 +03:00
bors
73641cd23b Auto merge of #88161 - michaelwoerister:fix-whole-archive-no-bundle, r=petrochenkov
Fix handling of +whole-archive native link modifier.

This PR fixes a bug in `add_upstream_native_libraries` that led to the `+whole-archive` modifier being ignored when linking in native libs.

~~Note that the PR does not address the situation when `+whole-archive` is combined with `+bundle`.~~
`@wesleywiser's` commit adds validation code that turns combining `+whole-archive` with `+bundle` into an error.

Fixes https://github.com/rust-lang/rust/issues/88085.

r? `@petrochenkov`
cc `@wesleywiser` `@gcoakes`
2021-09-07 12:31:11 +00:00
Michael Woerister
70c7317d71 Add test case for no-bundle/whole-archive native libs linking. 2021-09-07 14:14:08 +02:00
bors
b7c25e1679 Auto merge of #7642 - mikerite:fix-7641, r=flip1995
Add `TAU` to `approx_constant`

changelog: [`approx_constant`]: Add `TAU`
2021-09-07 08:16:36 +00:00
Michael Howell
d6ff916c2f test: add case for mutating iterator
Note that this incorrectly suggests a shared borrow,
but at least we know it's happening.
2021-09-07 00:51:27 -07:00
Michael Howell
543e601a9d fix(clippy): update loop lints to use arg.span
Adapts clippy for fe1a7f71fb
2021-09-06 23:30:04 -07:00
Jacob Pratt
56bb6f5a25
Fix docs for uX::checked_next_multiple_of 2021-09-07 02:14:04 -04:00
bors
385f8e2078 Auto merge of #88689 - Aaron1011:confused-std-resolver, r=cjgillot
Move `confused_type_with_std_module` to `ResolverOutputs`

This eliminates untracked global state from `Session`.
2021-09-07 05:28:53 +00:00
Michael Wright
a7a5a5d9b0 Add TAU to approx_constant 2021-09-07 05:50:04 +02:00
Mark Rousskov
2eac09d258 Use index newtyping for TyVid 2021-09-06 22:38:06 -04:00
bors
ffaf857045 Auto merge of #88448 - xu-cheng:btree-blk-build, r=Mark-Simulacrum
BTreeMap/BTreeSet::from_iter: use bulk building to improve the performance

Bulk building is a common technique to increase the performance of building a fresh btree map. Instead of inserting items one-by-one, we sort all the items beforehand then create the BtreeMap in bulk.

Benchmark
```
./x.py bench library/alloc --test-args btree::map::from_iter
```

* Before
```
test btree::map::from_iter_rand_100                      ... bench:       3,694 ns/iter (+/- 840)
test btree::map::from_iter_rand_10_000                   ... bench:   1,033,446 ns/iter (+/- 192,950)
test btree::map::from_iter_seq_100                       ... bench:       5,689 ns/iter (+/- 1,259)
test btree::map::from_iter_seq_10_000                    ... bench:     861,033 ns/iter (+/- 118,815)
```

* After
```
test btree::map::from_iter_rand_100                      ... bench:       3,033 ns/iter (+/- 707)
test btree::map::from_iter_rand_10_000                   ... bench:     775,958 ns/iter (+/- 105,152)
test btree::map::from_iter_seq_100                       ... bench:       2,969 ns/iter (+/- 336)
test btree::map::from_iter_seq_10_000                    ... bench:     258,292 ns/iter (+/- 29,364)
```
2021-09-07 02:24:11 +00:00
bors
11bbb52313 Auto merge of #83214 - cjgillot:dep-map, r=michaelwoerister
Mmap the incremental data instead of reading it.

Instead of reading the full incremental state using `fs::read_file`, we memmap it using a private read-only file-backed map.
This allows the system to reclaim any memory we are not using, while ensuring we are not polluted by
outside modifications to the file.

Suggested in https://github.com/rust-lang/rust/pull/83036#issuecomment-800458082 by `@bjorn3`
2021-09-06 23:58:16 +00:00
Camille GILLOT
bba4be681d Move rustc_mir::transform to rustc_mir_transform. 2021-09-07 00:43:14 +02:00
Andrew Hickman
d6ce3269b4 Suggest wapping expr in parentheses on invalid unary negation
Fixes #88701
2021-09-06 23:34:47 +01:00