Bastian Kauschke
ae80d7e012
update const arg queries
2020-07-15 12:58:33 +02:00
Bastian Kauschke
48bbf49765
const generics work!
2020-07-15 12:58:32 +02:00
Eduard-Mihai Burtescu
f07100afc8
Use for<'tcx> fn pointers in Providers, instead of having Providers<'tcx>.
2020-07-05 23:00:14 +03:00
bors
1557fb031b
Auto merge of #73643 - Manishearth:rollup-68dr8fz, r=Manishearth
...
Rollup of 9 pull requests
Successful merges:
- #72271 (Improve compiler error message for wrong generic parameter order)
- #72493 ( move leak-check to during coherence, candidate eval)
- #73398 (A way forward for pointer equality in const eval)
- #73472 (Clean up E0689 explanation)
- #73496 (Account for multiple impl/dyn Trait in return type when suggesting `'_`)
- #73515 (Add second message for LiveDrop errors)
- #73567 (Clarify --extern documentation.)
- #73572 (Fix typos in doc comments)
- #73590 (bootstrap: no `config.toml` exists regression)
Failed merges:
r? @ghost
2020-06-23 07:50:51 +00:00
Ralf Jung
1c74ab4226
Make is_freeze and is_copy_modulo_regions take TyCtxtAt
2020-06-21 11:47:19 +02:00
Oliver Scherer
9245ba8304
Remove the const_raw_ptr_comparison feature gate.
...
We can never supply a meaningful implementation of this.
Instead, the follow up commits will create two intrinsics
that approximate comparisons:
* `ptr_maybe_eq`
* `ptr_maybe_ne`
The fact that `ptr_maybe_eq(a, b)` is not necessarily the same
value as `!ptr_maybe_ne(a, b)` is a symptom of this entire
problem.
2020-06-19 18:13:41 +02:00
Ralf Jung
d931b031b4
rename FalseEdges -> FalseEdge
2020-06-07 10:12:21 +02:00
Bastian Kauschke
49b1b4c438
more LocalDefId
s
2020-05-30 12:22:29 +02:00
LeSeulArtichaut
e3d27ec1c8
Add explanation about taking the minimum of the two lints
2020-05-27 20:37:59 +02:00
LeSeulArtichaut
a3bae5ce73
Fix wrong conflict resolution
2020-05-27 20:37:58 +02:00
LeSeulArtichaut
a41f76321a
Use the lowest of unsafe_op_in_unsafe_fn
and safe_borrow_packed
for packed borrows in unsafe fns
2020-05-27 20:37:57 +02:00
LeSeulArtichaut
b3e012becc
Fix inverted if
condition
2020-05-27 20:37:57 +02:00
LeSeulArtichaut
bb67915028
Apply suggestions from code review
2020-05-27 20:37:57 +02:00
LeSeulArtichaut
a977df35d1
Implement RFC 2585
2020-05-27 20:37:56 +02:00
Dylan MacKenzie
119efbcbfb
Use is_const_fn_raw
when unsafety checking
2020-05-20 14:55:07 -07:00
Amanieu d'Antras
1e7b246086
Add asm! to MIR
2020-05-18 14:41:31 +01:00
Ralf Jung
07d5971eb6
move borrow-of-packed-field unsafety check out of loop
2020-05-16 16:04:31 +02:00
Nicholas Nethercote
27ae2f0d60
Shrink LocalDecl
by 56 bytes.
...
By boxing `local_info`.
2020-05-06 14:15:08 +10:00
Nicholas Nethercote
a17234ca54
Add SourceInfo::outermost
.
2020-05-06 12:15:26 +10:00
Dylan DPC
78dc7e15c9
Rollup merge of #71772 - cjgillot:ensure, r=petrochenkov
...
Mark query function as must_use.
And use the `ensure()` version when the result is not needed.
2020-05-02 18:27:35 +02:00
Camille GILLOT
6cde87def1
Mark query function as must_use.
2020-05-01 17:45:30 +02:00
LeSeulArtichaut
f2c6cbd98f
Prevent calls to functions with #[target_feature]
in safe contexts
2020-05-01 16:24:59 +02:00
marmeladema
abd31ad6e8
Use LocalDefId
in unsafety_check_result
query
2020-04-27 21:50:17 +01:00
marmeladema
bfce24aa67
Modify as_local_hir_id
to return a bare HirId
2020-04-23 23:14:07 +01:00
marmeladema
6148db719f
Modify as_local_hir_id
to accept a LocalDefId
instead of a DefId
2020-04-23 23:14:07 +01:00
Dylan MacKenzie
8287842eb4
Use Body
everywhere
2020-04-22 09:57:43 -07:00
Josh Stone
7b005c5fcb
Dogfood more or_patterns in the compiler
2020-04-19 07:33:58 -07:00
ljedrz
66575c9962
comment on the sorting of unused unsafe blocks
2020-04-16 20:00:54 +02:00
ljedrz
672b7682b0
sort unused unsafe blocks by Span instead of NodeId
2020-04-16 14:53:09 +02:00
ljedrz
d167408cb4
simplify unused unsafe block handling
2020-04-16 14:24:52 +02:00
Santiago Pastorino
890b39381f
Use Place directly, it's Copy even more use cases
2020-03-31 14:45:05 -03:00
Santiago Pastorino
760bca4f5b
Use Place directly on check_mut_borrowing_layout_constrained_field, it's Copy
2020-03-31 14:44:00 -03:00
Matthias Krüger
9bba047c2e
Use if let instead of match when only matching a single variant (clippy::single_match)
...
Makes code more compact and reduces nestig.
2020-03-30 10:52:29 +02:00
Mazdak Farrokhzad
1ccb0b4a02
rustc -> rustc_middle part 3 (rustfmt)
2020-03-30 07:19:55 +02:00
Mazdak Farrokhzad
0cb9e36090
rustc -> rustc_middle part 2
2020-03-30 07:16:56 +02:00
Dylan MacKenzie
538cdef64b
Use &
to do deref coercion for ReadOnlyBodyAndCache
2020-03-29 13:30:26 -07:00
Dylan MacKenzie
b641e9e358
Make Visitor::visit_body
take a simple Body
2020-03-29 11:56:36 -07:00
Bastian Kauschke
37603f499a
clarify hir_id <-> node_id method names
2020-03-27 16:43:20 +01:00
Amanieu d'Antras
d162d096dd
Rename asm! to llvm_asm!
...
asm! is left as a wrapper around llvm_asm! to maintain compatibility.
2020-03-26 15:49:22 +00:00
Esteban Küber
f18a6dcec0
Rename def_span
to guess_head_span
2020-03-25 16:45:12 -07:00
Mazdak Farrokhzad
4392a8b73c
use direct imports for rustc::{lint, session}
.
2020-03-16 02:52:06 +01:00
Mazdak Farrokhzad
73a625b5fb
remove unnecessary hir::map imports
2020-03-16 02:49:19 +01:00
John Kåre Alsaker
8b16b023b1
Index HIR after creating TyCtxt
2020-03-14 22:52:30 +01:00
Matthias Krüger
7b1b08cfee
remove lifetimes that can be elided (clippy::needless_lifetimes)
2020-03-12 20:03:09 +01:00
Matthias Krüger
de7c40c168
use .iter() instead of .into_iter() on references.
2020-02-29 03:14:01 +01:00
Matthew Jasper
4af0952961
Call is_freeze
less in unsafety-checking
...
This is to avoid cycles when calling `is_freeze` on an opaque type.
2020-02-14 20:12:46 +00:00
jumbatm
0b2436f3a4
Move more into decorate functions.
2020-02-11 19:50:26 +10:00
jumbatm
d246385122
Run RustFmt
2020-02-11 19:49:01 +10:00
jumbatm
7c58ffe874
Invert control in struct_lint_level.
...
Caller now passes in a `decorate` function, which is only run if the
lint is allowed.
2020-02-11 19:47:40 +10:00
Dylan DPC
8f5858007c
Rollup merge of #68588 - Centril:check-unsafety-clean, r=Mark-Simulacrum
...
check_unsafety: more code reuse
r? oli-obk
2020-01-31 01:21:24 +01:00