Accepting request 800013 from home:MSirringhaus:branches:devel:languages:rust
- Update to version 1.43.0 OBS-URL: https://build.opensuse.org/request/show/800013 OBS-URL: https://build.opensuse.org/package/show/devel:languages:rust/rust?expand=0&rev=248
This commit is contained in:
86
rust.changes
86
rust.changes
@@ -1,3 +1,89 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Apr 29 11:46:59 UTC 2020 - Martin Sirringhaus <martin.sirringhaus@suse.com>
|
||||
|
||||
- Update to version 1.43.0
|
||||
+ Language
|
||||
- Fixed using binary operations with `&{number}` (e.g. `&1.0`)
|
||||
not having the type inferred correctly.
|
||||
- Attributes such as `#[cfg()]` can now be used on `if`
|
||||
expressions.
|
||||
- Syntax only changes:
|
||||
* Allow `type Foo: Ord` syntactically.
|
||||
* Fuse associated and extern items up to defaultness.
|
||||
* Syntactically allow `self` in all `fn` contexts.
|
||||
* Merge `fn` syntax + cleanup item parsing.
|
||||
* `item` macro fragments can be interpolated into `trait`s,
|
||||
`impl`s, and `extern` blocks.
|
||||
For example, you may now write:
|
||||
```rust
|
||||
macro_rules! mac_trait {
|
||||
($i:item) => {
|
||||
trait T { $i }
|
||||
}
|
||||
}
|
||||
mac_trait! {
|
||||
fn foo() {}
|
||||
}
|
||||
```
|
||||
* These are still rejected *semantically*, so you will likely
|
||||
receive an error but these changes can be seen and parsed by
|
||||
macros and conditional compilation.
|
||||
+ Compiler
|
||||
- You can now pass multiple lint flags to rustc to override the
|
||||
previous flags.
|
||||
For example; `rustc -D unused -A unused-variables` denies
|
||||
everything in the `unused` lint group except `unused-variables`
|
||||
which is explicitly allowed. However, passing
|
||||
`rustc -A unused-variables -D unused` denies everything in
|
||||
the `unused` lint group **including** `unused-variables` since
|
||||
the allow flag is specified before the deny flag (and therefore
|
||||
overridden).
|
||||
- rustc will now prefer your system MinGW libraries over its
|
||||
bundled libraries if they are available on `windows-gnu`.
|
||||
- rustc now buffers errors/warnings printed in JSON.
|
||||
+ Libraries
|
||||
- `Arc<[T; N]>`, `Box<[T; N]>`, and `Rc<[T; N]>`, now implement
|
||||
`TryFrom<Arc<[T]>>`,`TryFrom<Box<[T]>>`, and `TryFrom<Rc<[T]>>`
|
||||
respectively.
|
||||
**Note** These conversions are only available when `N` is
|
||||
`0..=32`.
|
||||
- You can now use associated constants on floats and integers
|
||||
directly, rather than having to import the module.
|
||||
e.g. You can now write `u32::MAX` or `f32::NAN` with no imports.
|
||||
- `u8::is_ascii` is now `const`.
|
||||
- `String` now implements `AsMut<str>`.
|
||||
- Added the `primitive` module to `std` and `core`.
|
||||
This module reexports Rust's primitive types. This is mainly
|
||||
useful in macros where you want avoid these types being shadowed.
|
||||
- Relaxed some of the trait bounds on `HashMap` and `HashSet`.
|
||||
- `string::FromUtf8Error` now implements `Clone + Eq`.
|
||||
+ Stabilized APIs
|
||||
- `Once::is_completed`
|
||||
- `f32::LOG10_2`
|
||||
- `f32::LOG2_10`
|
||||
- `f64::LOG10_2`
|
||||
- `f64::LOG2_10`
|
||||
- `iter::once_with`
|
||||
+ Cargo
|
||||
- You can now set config `[profile]`s in your `.cargo/config`,
|
||||
or through your environment.
|
||||
- Cargo will now set `CARGO_BIN_EXE_<name>` pointing to a
|
||||
binary's executable path when running integration tests or
|
||||
benchmarks.
|
||||
`<name>` is the name of your binary as-is e.g. If you wanted
|
||||
the executable path for a binary named `my-program`you would
|
||||
use `env!("CARGO_BIN_EXE_my-program")`.
|
||||
+ Misc
|
||||
- Certain checks in the `const_err` lint were deemed unrelated
|
||||
to const evaluation, and have been moved to the
|
||||
`unconditional_panic` and `arithmetic_overflow` lints.
|
||||
+ Compatibility Notes
|
||||
- Having trailing syntax in the `assert!` macro is now a hard
|
||||
error. This has been a warning since 1.36.0.
|
||||
- Fixed `Self` not having the correctly inferred type. This
|
||||
incorrectly led to some instances being accepted, and now
|
||||
correctly emits a hard error.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Apr 7 08:54:37 UTC 2020 - Andreas Schwab <schwab@suse.de>
|
||||
|
||||
|
Reference in New Issue
Block a user