bors
2359ecc71f
Auto merge of #77578 - euclio:max-suggestion, r=davidtwco
...
suggest `MAX` constant if -1 is assigned to unsigned type
Fixes #76413 .
Fixes #77416 .
2020-10-09 04:22:18 +00:00
xd009642
a6e2b636e6
Implement the instruction_set attribute
2020-10-08 23:32:20 +01:00
Andy Russell
ced11a83cb
suggest MAX
constant if -1 is assigned to unsigned type
2020-10-08 13:11:31 -04:00
Matthew Jasper
022c148fcd
Fix tests from rebase
2020-10-06 11:19:33 +01:00
Matthew Jasper
1db284ecb0
Avoid creating useless projection predicate
2020-10-06 11:19:33 +01:00
Matthew Jasper
27534b3932
Fix rebase
2020-10-06 11:19:33 +01:00
Matthew Jasper
d08ab945de
Fix rebase
2020-10-06 11:19:32 +01:00
Matthew Jasper
0dfa6ff3be
Avoid cycles from projection bounds
...
Only check the own predicates of associated types when confirming
projection candidates.
Also consider implied bounds when comparing trait and impl methods.
2020-10-06 11:19:32 +01:00
Matthew Jasper
bc08b791bc
Fix bugs in evaluating WellFormed predicates
...
- List the nestsed obligations in an order that works with the
single pass used by evaluation
- Propagate recursion depth correctly
2020-10-06 11:19:31 +01:00
Matthew Jasper
582ccec1c5
Remove predicates on associated types from traits
...
These need to only be bounds to avoid cycle errors in trait checking.
2020-10-06 11:19:31 +01:00
Matthew Jasper
8787090964
Address review comments
2020-10-06 11:19:31 +01:00
Matthew Jasper
042464f75a
Fix tests and bootstrap
2020-10-06 11:19:30 +01:00
Matthew Jasper
5b279c8016
Check opaque types satisfy their bounds
2020-10-06 11:19:30 +01:00
Matthew Jasper
b3057f4d5f
Check projections are well-formed when using projection candidates
2020-10-06 11:19:29 +01:00
Matthew Jasper
f958e6c246
Separate bounds and predicates for associated/opaque types
2020-10-06 11:19:29 +01:00
Matthew Jasper
d297147e62
Split bounds from predicates
2020-10-06 11:19:22 +01:00
Matthew Jasper
a7ead3bd53
Move item_bounds to typeck::collect
2020-10-06 11:18:45 +01:00
Matthew Jasper
0eb87ed55f
Rename projection_predicates to item_bounds
2020-10-06 11:18:45 +01:00
Yuki Okushi
2970af8e28
Rollup merge of #77559 - camelid:fix-rustdoc-warnings-invalid-rust-syntax, r=lcnr
...
Fix rustdoc warnings about invalid Rust syntax
2020-10-06 16:26:09 +09:00
Camelid
c877ff3664
Fix rustdoc warnings about invalid Rust syntax
2020-10-04 19:35:44 -07:00
Dylan DPC
9dbc9ed870
Rollup merge of #77514 - scottmcm:less-once-chain-once, r=estebank
...
Replace some once(x).chain(once(y)) with [x, y] IntoIter
Now that we have by-value array iterators that are [already used](25c8c53dd9/compiler/rustc_hir/src/def.rs (L305-L307)
)...
For example,
```diff
- once(self.type_ns).chain(once(self.value_ns)).chain(once(self.macro_ns)).filter_map(|it| it)
+ IntoIter::new([self.type_ns, self.value_ns, self.macro_ns]).filter_map(|it| it)
```
2020-10-05 02:29:42 +02:00
Scott McMurray
d74b8e0505
Replace some once(x).chain(once(y)) with [x, y] IntoIter
...
Now that we have by-value array iterators...
2020-10-03 16:51:43 -07:00
varkor
96eb68b121
Add FIXME
for const generic defaults
2020-10-03 14:28:55 +01:00
varkor
0801263279
Fix missing diagnostic span for impl Trait
with const generics
2020-10-02 01:39:04 +01:00
bors
ef663a8a48
Auto merge of #77372 - jonas-schievink:rollup-e5bdzga, r=jonas-schievink
...
Rollup of 12 pull requests
Successful merges:
- #77037 (more tiny clippy cleanups)
- #77233 (BTreeMap: keep an eye out on the size of the main components)
- #77280 (Ensure that all LLVM components requested by tests are available on CI)
- #77284 (library: Forward compiler-builtins "mem" feature)
- #77296 (liveness: Use Option::None to represent absent live nodes)
- #77322 (Add unstable book docs for `-Zunsound-mir-opts`)
- #77328 (Use `rtassert!` instead of `assert!` from the child process after fork() in std::sys::unix::process::Command::spawn())
- #77331 (Add test for async/await combined with const-generics.)
- #77338 (Fix typo in alloc vec comment)
- #77340 (Alloc vec use imported path)
- #77345 (Add test for issue #74761 )
- #77348 (Update books)
Failed merges:
r? `@ghost`
2020-09-30 20:49:27 +00:00
Jonas Schievink
248d6bf1e2
Rollup merge of #77037 - matthiaskrgr:cl42ppy, r=Dylan-DPC
...
more tiny clippy cleanups
commits stand alone and can be reviewed one by one
2020-09-30 20:56:05 +02:00
Hugues de Valon
2588287def
Add more tests and check for ABI
...
Signed-off-by: Hugues de Valon <hugues.devalon@arm.com>
2020-09-30 18:10:17 +01:00
Hugues de Valon
1aaafac6ff
Add support for cmse_nonsecure_entry attribute
...
This patch adds support for the LLVM cmse_nonsecure_entry attribute.
This is a target-dependent attribute that only has sense for the
thumbv8m Rust targets.
You can find more information about this attribute here:
https://developer.arm.com/documentation/ecm0359818/latest/
Signed-off-by: Hugues de Valon <hugues.devalon@arm.com>
2020-09-30 15:48:59 +01:00
bors
4d52dc4790
Auto merge of #76754 - varkor:diagnostic-cleanup-ii, r=ecstatic-morse
...
Clean up diagnostics for arithmetic operation errors
Plus a small tweak to a range pattern error message.
2020-09-29 14:28:58 +00:00
Ralf Jung
88ae20d8aa
Rollup merge of #76711 - davidtwco:issue-51154-param-closure, r=estebank
...
diag: improve closure/generic parameter mismatch
Fixes #51154 .
This PR improves the diagnostic when a type parameter is expected and a closure is found, noting that each closure has a distinct type and therefore could not always match the caller-chosen type of the parameter.
r? @estebank
2020-09-28 18:39:42 +02:00
bors
535d27ac9a
Auto merge of #77236 - matthewjasper:defer-typeof-impl-trait, r=davidtwco
...
Compute underlying type of impl trait types later in compilation
Also change a `bug!` to `delay_span_bug`
Closes #74018
2020-09-28 12:47:23 +00:00
bors
d902752866
Auto merge of #77118 - exrook:stability-generic-parameters-2, r=varkor
...
Stability annotations on generic parameters (take 2.5)
Rebase of #72314 + more tests
Implements rust-lang/wg-allocators#2 .
2020-09-27 12:51:21 +00:00
Matthew Jasper
3a81adeca2
Call type_of
for opaque types later in compilation
...
This ensures that various wf checks have already been done before we
typeck item bodies.
2020-09-26 17:56:03 +01:00
varkor
94c789b275
char
not char
2020-09-26 13:34:49 +01:00
Ralf Jung
9e02642fb3
Rollup merge of #77211 - est31:remove_unused_allow, r=oli-obk
...
Remove unused #[allow(...)] statements from compiler/
2020-09-26 12:58:34 +02:00
Ralf Jung
ac8169dc10
Rollup merge of #77093 - lcnr:const-generics-infer-warning, r=varkor
...
merge `need_type_info_err(_const)`
I hoped that this would automatically solve #76737 but it doesn't quite seem like it
fixes #77092
r? @varkor
2020-09-26 12:58:17 +02:00
Bastian Kauschke
32195ac8f4
rename functions
2020-09-26 10:28:15 +02:00
est31
12187b7f86
Remove unused #[allow(...)] statements from compiler/
2020-09-26 01:25:55 +02:00
Jonas Schievink
e739468f97
Rollup merge of #77155 - lcnr:ImplSource, r=ecstatic-morse
...
remove enum name from ImplSource variants
This is quite a lot cleaner in my opinion.
2020-09-25 19:42:48 +02:00
Jonas Schievink
1b8c939a8d
Rollup merge of #76973 - lzutao:unstably-const-assume, r=oli-obk
...
Unstably allow assume intrinsic in const contexts
Not sure much about this usage because there are concerns
about [blocking optimization][1] and [slowing down LLVM][2] when using `assme` intrinsic
in inline functions.
But since Oli suggested in https://github.com/rust-lang/rust/issues/76960#issuecomment-695772221 ,
here we are.
[1]: https://github.com/rust-lang/rust/pull/54995#issuecomment-429302709
[2]: https://github.com/rust-lang/rust/issues/49572#issuecomment-589615423
2020-09-25 19:42:29 +02:00
Jonas Schievink
6f3da3d53f
Rollup merge of #77121 - duckymirror:html-root-url, r=jyn514
...
Updated html_root_url for compiler crates
Closes #77103
r? @jyn514
2020-09-25 02:29:45 +02:00
Bastian Kauschke
1857184cd1
remove enum name from ImplSource variants
2020-09-24 19:22:36 +02:00
Matthias Krüger
d7a5c574b1
use std::mem::take(x) instead of std::mem::replace(x, Default::default()) (clippy::mem_replace_with_default)
2020-09-24 13:38:08 +02:00
Bastian Kauschke
3f9015b22d
visit impl self ty + trait
2020-09-24 09:04:26 +02:00
Bastian Kauschke
f8d3f401df
walk hir to get const evaluatable predicates
2020-09-24 09:03:50 +02:00
Bastian Kauschke
ac1d0d8b28
fmt, use IndexSet directly instead of UniquePredicates
2020-09-24 09:03:14 +02:00
Bastian Kauschke
e1f408e6c8
const_evaluatable_checked: collect predicates from fn_sig
2020-09-24 09:03:07 +02:00
Erik Hofmayer
138a2e5eaa
/nightly/nightly-rustc
2020-09-23 21:51:56 +02:00
Erik Hofmayer
dd66ea2d3d
Updated html_root_url for compiler crates
2020-09-23 21:14:43 +02:00
Dylan DPC
bcdbe79f0c
Rollup merge of #76994 - yuk1ty:fix-small-typo, r=estebank
...
fix small typo in docs and comments
Fixed `the the` to `the`, as far as I found.
2020-09-23 14:54:07 +02:00