2019-05-02 17:34:15 -05:00
|
|
|
error[E0382]: use of moved value: `x`
|
|
|
|
--> $DIR/borrowck-reinit.rs:6:16
|
2017-11-09 08:46:35 -06:00
|
|
|
|
|
2019-01-02 18:43:08 -06:00
|
|
|
LL | let mut x = Box::new(0);
|
2020-09-02 02:40:56 -05:00
|
|
|
| ----- move occurs because `x` has type `Box<i32>`, which does not implement the `Copy` trait
|
2019-01-02 18:43:08 -06:00
|
|
|
...
|
2018-02-22 18:42:32 -06:00
|
|
|
LL | drop(x);
|
2017-11-09 08:46:35 -06:00
|
|
|
| - value moved here
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | let _ = (1,x);
|
MIR: Fix value moved diagnose messages
MIR: adopt borrowck test
Fix trailing whitespace
span_bug! on unexpected action
Make RegionVid use newtype_index!
Closes #45843
Check rvalue aggregates during check_stmt in tycheck, add initial, (not passing) test
Fix failing test
Remove attributes and test comments accidentally left behind, add in span_mirbugs
Normalize LvalueTy for ops and format code to satisfy tidy check
only normalize operand types when in an ADT constructor
avoid early return
handle the active field index in unions
normalize types in ADT constructor
Fixes #45940
Fix borrowck compiler errors for upvars contain "spurious" dereferences
Fixes #46003
added associated function Box::leak
Box::leak - improve documentation
Box::leak - fixed bug in documentation
Box::leak - relaxed constraints wrt. lifetimes
Box::leak - updated documentation
Box::leak - made an oops, fixed now =)
Box::leak: update unstable issue number (46179).
Add test for #44953
Add missing Debug impls to std_unicode
Also adds #![deny(missing_debug_implementations)] so they don't get
missed again.
Amend RELEASES for 1.22.1
and fix the date for 1.22.0
Rename param in `[T]::swap_with_slice` from `src` to `other`.
The idea of ‘source’ and ‘destination’ aren’t very applicable for this
operation since both slices can both be considered sources and
destinations.
Clarify stdin behavior of `Command::output`.
Fixes #44929.
Add hints for the case of confusing enum with its variants
Add failing testcases
Add module population and case of enum in place of expression
Use for_each_child_stable in find_module
Use multiline text for crate conflict diagnostics
Make float::from_bits transmute (and update the documentation to reflect this).
The current implementation/documentation was made to avoid sNaN because of
potential safety issues implied by old/bad LLVM documentation. These issues
aren't real, so we can just make the implementation transmute (as permitted
by the existing documentation of this method).
Also the documentation didn't actually match the behaviour: it said we may
change sNaNs, but in fact we canonicalized *all* NaNs.
Also an example in the documentation was wrong: it said we *always* change
sNaNs, when the documentation was explicitly written to indicate it was
implementation-defined.
This makes to_bits and from_bits perfectly roundtrip cross-platform, except
for one caveat: although the 2008 edition of IEEE-754 specifies how to
interpet the signaling bit, earlier editions didn't. This lead to some platforms
picking the opposite interpretation, so all signaling NaNs on x86/ARM are quiet
on MIPS, and vice-versa.
NaN-boxing is a fairly important optimization, while we don't even guarantee
that float operations properly preserve signalingness. As such, this seems like
the more natural strategy to take (as opposed to trying to mangle the signaling
bit on a per-platform basis).
This implementation is also, of course, faster.
Simplify an Iterator::fold to Iterator::any
This method of once-diagnostics doesn't allow nesting
UI tests extract the regular output from the 'rendered' field in json
Merge cfail and ui tests into ui tests
Add a MIR pass to lower 128-bit operators to lang item calls
Runs only with `-Z lower_128bit_ops` since it's not hooked into targets yet.
Include tuple projections in MIR tests
Add type checking for the lang item
As part of doing so, add more lang items instead of passing u128 to the i128 ones where it doesn't matter in twos-complement.
Handle shifts properly
* The overflow-checking shift items need to take a full 128-bit type, since they need to be able to detect idiocy like `1i128 << (1u128 << 127)`
* The unchecked ones just take u32, like the `*_sh?` methods in core
* Because shift-by-anything is allowed, cast into a new local for every shift
incr.comp.: Make sure we don't lose unused green results from the query cache.
rustbuild: Update LLVM and enable ThinLTO
This commit updates LLVM to fix #45511 (https://reviews.llvm.org/D39981) and
also reenables ThinLTO for libtest now that we shouldn't hit #45768. This also
opportunistically enables ThinLTO for libstd which was previously blocked
(#45661) on test failures related to debuginfo with a presumed cause of #45511.
Closes #45511
std: Flag Windows TLS dtor symbol as #[used]
Turns out ThinLTO was internalizing this symbol and eliminating it. Worse yet if
you compiled with LTO turns out no TLS destructors would run on Windows! The
`#[used]` annotation should be a more bulletproof implementation (in the face of
LTO) of preserving this symbol all the way through in LLVM and ensuring it makes
it all the way to the linker which will take care of it.
Add enum InitializationRequiringAction
Fix tidy tests
2017-11-23 05:36:48 -06:00
|
|
|
| ^ value used here after move
|
2022-11-02 23:22:24 -05:00
|
|
|
|
|
|
|
|
help: consider cloning the value if the performance cost is acceptable
|
|
|
|
|
|
|
|
|
LL | drop(x.clone());
|
|
|
|
| ++++++++
|
2017-11-09 08:46:35 -06:00
|
|
|
|
2019-05-02 17:34:15 -05:00
|
|
|
error: aborting due to previous error
|
2017-11-09 08:46:35 -06:00
|
|
|
|
2018-03-03 08:59:40 -06:00
|
|
|
For more information about this error, try `rustc --explain E0382`.
|