Igor Matuszewski
b4ffedee67
Update rls so it compiles with #45468
2017-11-01 00:48:26 +01:00
Cldfire
61396a8286
Add UI test
2017-10-31 19:35:51 -04:00
Josh Leeb-du Toit
87c951da0f
Improve display of error E0308 for structs
...
Improve the display of error E0308 for structs by adding a "did you
mean" span label.
2017-11-01 10:21:26 +11:00
bors
f3b900cc3b
Auto merge of #44764 - nvzqz:master, r=alexcrichton
...
Implement TryFrom<&[T]> for &[T; N]
There are many cases where a buffer with a static compile-time size is preferred over a slice with a dynamic size. This allows for performing a checked conversion from `&[T]` to `&[T; N]`. This may also lead to compile-time optimizations involving `[T; N]` such as loop unrolling.
This is my first PR to Rust, so I'm not sure if discussion of this change should happen here or does it need its own RFC? I figured these changes would be a subset of #33417 .
2017-10-31 23:06:37 +00:00
Guillaume Gomez
af1e4f6d7c
add missing docs for MetadataExt
2017-10-31 22:37:46 +01:00
laurent
0d7285393f
Formatting tweak.
2017-10-31 21:26:49 +00:00
laurent
531b7f2e27
Add some missing spaces.
2017-10-31 21:23:46 +00:00
est31
6a16a7c05b
Also support macro generated atomic types
...
This is kind of a hack but it works...
2017-10-31 21:46:05 +01:00
est31
911e476cbe
Tidy: track rustc_const_unstable feature gates as well
...
This is important for the unstable book stub generation.
2017-10-31 21:39:32 +01:00
Doug Goldstein
86c09f3a45
add description to libstd
...
Include a description field for libstd in Cargo metadata.
2017-10-31 15:10:10 -05:00
Doug Goldstein
4519192d4f
add repository info to libstd
...
Include the repository info for libstd in the Cargo metadata.
2017-10-31 14:57:27 -05:00
Doug Goldstein
ea103ef57f
add license data to libstd
...
Include the license of libstd in the cargo metadata
2017-10-31 14:49:29 -05:00
laurent
6d060bd49a
Fix spans and error messages.
2017-10-31 19:45:12 +00:00
Matt Brubeck
351f7b02de
Fix incorrect error type in Read::byte docs
2017-10-31 12:30:15 -07:00
M Farkas-Dyck
be21779072
since = "1.23.0"
2017-10-31 11:15:10 -08:00
John Paul Adrian Glaubitz
d7dec7c8d7
bootstrap: Add missing cputype matching for sparc64
2017-10-31 19:26:41 +01:00
Niko Matsakis
aae3e74e70
patch mir-opt reference files
2017-10-31 14:02:31 -04:00
Cldfire
ff832405d0
Suggest renaming import if names clash
2017-10-31 13:31:48 -04:00
Niko Matsakis
9b3af6ce3c
rewrite write_mir_fn_graphviz
to cope with non-global tcx
2017-10-31 12:55:54 -04:00
Niko Matsakis
d9fb792d7c
treat -Znll as implying -Zborrowck-mir
2017-10-31 12:41:41 -04:00
Niko Matsakis
99aa313636
runtest: fix mir directory and delete outdated MIR files
2017-10-31 12:41:41 -04:00
Niko Matsakis
7675ea997a
remove the NLL pass (it is now invoked by mir borrowck)
2017-10-31 12:41:40 -04:00
Niko Matsakis
bf57a230eb
WIP patch compile-fail/nll/region-ends-after-if-condition.rs
2017-10-31 12:41:40 -04:00
Niko Matsakis
f27eb1e684
change region display to '_#Nr
, update the newtype_index!
macro
...
The macro now takes a format string. It no longer defaults to using the
type name. Didn't seem worth going through contortions to maintain. I
also changed most of the debug formats to be `foo[N]` instead of `fooN`.
2017-10-31 12:41:40 -04:00
Niko Matsakis
a94b01a0e2
connect MIR borrowck with NLL
2017-10-31 12:41:40 -04:00
Niko Matsakis
81449174f3
make the dataflow / mir-borrowck types carry a 'tcx
lifetime
...
Also, factor out `do_mir_borrowck`, which is the code that actually
performs the MIR borrowck from within the scope of an inference context.
This change should be a pure refactoring.
2017-10-31 12:41:40 -04:00
Niko Matsakis
82b287a8c8
test "needs drop" on region-erased, lifted types
...
This will be important in next commit, since the input types will be
tagged not with `'gcx` but rather `'tcx`. Also, using the region-erased,
lifted types enables better caching.
2017-10-31 12:41:40 -04:00
Niko Matsakis
b2c248efea
reorder 'gcx and 'tcx in BorrowckErrors
impl
2017-10-31 12:41:40 -04:00
Niko Matsakis
29cdd73062
make closure_self_ty
invokable with 'gcx
and 'tcx
2017-10-31 12:41:40 -04:00
Niko Matsakis
5aa1cbf18f
make MirSource::from_local_def_id
invokable with 'gcx and 'tcx
2017-10-31 12:41:39 -04:00
Niko Matsakis
68c4844a1b
make nll separately invokable
2017-10-31 12:41:39 -04:00
Santiago Pastorino
dde61f3855
add basic region subtyping inference
2017-10-31 12:41:39 -04:00
Santiago Pastorino
b8615f3bea
add reborrow constraints
2017-10-31 12:41:39 -04:00
Niko Matsakis
f700728a3b
make end-point optional in the borrow check
2017-10-31 12:41:39 -04:00
Niko Matsakis
5b2adcce11
factor out NLL invocation interface
2017-10-31 12:41:39 -04:00
Niko Matsakis
7414060344
update the format of liveness debug dumps to be more readable
2017-10-31 12:41:39 -04:00
Niko Matsakis
24442ffa66
add subregion between borrow region and resulting reference
2017-10-31 12:41:39 -04:00
Niko Matsakis
af09f720d6
preliminary support for may-dangle attribute and drop constraints
2017-10-31 12:41:38 -04:00
Niko Matsakis
e02937848b
extend liveness to distinguish "drop" and "non-drop" uses
2017-10-31 12:41:38 -04:00
Niko Matsakis
cb56ff5a77
reorder liveness to bring the more significant code up top
2017-10-31 12:41:38 -04:00
Niko Matsakis
899c7ad9b2
avoid unnecessary copies in liveness computation
2017-10-31 12:41:38 -04:00
Niko Matsakis
7523c7368c
introduce liveness constraints into NLL code
...
And do a bunch of gratuitious refactoring that I did not bother to
separate into nice commits.
2017-10-31 12:41:38 -04:00
Niko Matsakis
8535a4a32c
add helper for_each_free_region
that iterates over free regions
2017-10-31 12:41:38 -04:00
Niko Matsakis
1f06ba486f
extend liveness to compute intrablock liveness and add unit tests
2017-10-31 12:41:38 -04:00
Niko Matsakis
ea03a43fe6
introduce apply
helper that applies a DefUse set to live bits
2017-10-31 12:41:38 -04:00
Niko Matsakis
bd2511652f
extend dump_mir
to work for any tcx, not just global tcx
2017-10-31 12:41:37 -04:00
Niko Matsakis
16b5f244fb
rename BlockInfo
and BlockInfoVisitor
to DefsUses
2017-10-31 12:41:37 -04:00
Niko Matsakis
9a47fd2dac
factor out pre_defs
field by going backwards
2017-10-31 12:41:37 -04:00
Niko Matsakis
acc5c4345c
add a test for the subtle case around calls
2017-10-31 12:41:37 -04:00
Niko Matsakis
c42a64518a
execute liveness, write a simple test
2017-10-31 12:41:37 -04:00