Skip to content

Rollup of 19 pull requests #55902

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 61 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
e753d21
miri: accept extern types in structs if they are the only field
RalfJung Nov 4, 2018
aca76d4
test for offset and alignment of the sized part, instead of field count
RalfJung Nov 4, 2018
bb17f71
also test with PhantomData
RalfJung Nov 4, 2018
5ebd077
make it more obvious that the size is not relevant
RalfJung Nov 5, 2018
a6622c2
note some FIXMEs
RalfJung Nov 5, 2018
1224e01
Format BtreeMap::range_mut example
kngwyu Nov 6, 2018
ba0bab3
make sure we only guess field alignment at offset 0
RalfJung Nov 6, 2018
ece4f47
For diagnostics, set spans of drops of temps to be that of the statem…
pnkfelix Nov 8, 2018
3011ecd
Narrow span of temp holding the value of a Block expression to the bl…
pnkfelix Nov 8, 2018
556f583
Regression test for issue #54382
pnkfelix Nov 8, 2018
e7e1a52
Refactor code so that block_context observations has nicely named (an…
pnkfelix Nov 8, 2018
dd63982
Revise the temp creation for blocks in `stmt_expr` to setup `BlockTai…
pnkfelix Nov 8, 2018
3977133
Allow unsized types in mem::drop and mem::forget
Nov 8, 2018
06cf9ae
Fix return type of forget intrinsic
Nov 8, 2018
f211581
Use T: ?Sized in intrinsics::forget
Nov 8, 2018
401cb6b
don't inline `pub use some_crate` unless directly asked to
QuietMisdreavus Nov 9, 2018
893f539
Fixes #55775 -- fixed regression in Command::exec's handling of PATH.
Nov 8, 2018
5e7b7f2
make PhantomData #[structural_match].
Centril Nov 10, 2018
852ff1f
add FromIterator<A> to Box<[A]>
lcnr Nov 10, 2018
3b3b60c
Avoid converting bytes to UTF-8 strings to print, just pass bytes to …
spastorino Nov 10, 2018
c148714
Rewrite `...` as `..=` as a MachineApplicable 2018 idiom lint
varkor Nov 10, 2018
c63df7c
Use non-short suggestion for parenthesised ..=
varkor Nov 10, 2018
20ef40a
Fix a typo in std::panic
dwijnand Nov 11, 2018
5030794
Merge branch 'master' of https://github.com/rust-lang/rust
lcnr Nov 11, 2018
ab55d9b
change attribute to stable
lcnr Nov 11, 2018
a62af85
Fix typos.
waywardmonkeys Nov 11, 2018
93b5112
Added comment for From trait implementation: boxed string slice to St…
denisvasilik Nov 10, 2018
f0bfbd3
Added comments for trait implementations.
denisvasilik Nov 11, 2018
dc0fd65
Whitespace cleanup according to Rust's style guidelines.
denisvasilik Nov 11, 2018
6f3add3
Minor style guide corrections.
denisvasilik Nov 11, 2018
04cc0d6
save-analysis: Don't panic for macro-generated use globs
Xanewok Nov 11, 2018
4fdae85
Reference count `crate_inherent_impls`s return value.
hugwijst Nov 12, 2018
c211238
Fix TLS errors when downloading stage0
dlrobertson Nov 12, 2018
ace20b9
for uniformity, also move memory_deallocated to AllocationExtra
RalfJung Nov 12, 2018
075983c
global allocators: add a few comments
RalfJung Nov 12, 2018
3c88cfe
remove unused import
RalfJung Nov 12, 2018
4d2934e
Add forget_unsized only
Nov 12, 2018
56d3a82
Update docs
Nov 12, 2018
ab8a947
Move `static_assert!` into librustc_data_structures.
nnethercote Nov 8, 2018
49f482f
Move a `static_assert!` to a better spot.
nnethercote Nov 8, 2018
fb3dd9f
Add a static assertion about the size of `ast::Expr`.
nnethercote Nov 8, 2018
e01e0b0
Move two `static_assert!`s to better spots.
nnethercote Nov 12, 2018
1a61f26
Rollup merge of #55672 - RalfJung:miri-extern-types, r=eddyb
pietroalbini Nov 12, 2018
d1af662
Rollup merge of #55711 - kngwyu:btreemap-rangemut-doc, r=Mark-Simulacrum
pietroalbini Nov 12, 2018
1449acc
Rollup merge of #55754 - spastorino:fix-process-output-docs, r=alexcr…
pietroalbini Nov 12, 2018
746ef18
Rollup merge of #55781 - pnkfelix:issue-54382-more-precise-spans-for-…
pietroalbini Nov 12, 2018
ffa7767
Rollup merge of #55785 - stjepang:unsized-drop-forget, r=alexcrichton
pietroalbini Nov 12, 2018
e9376b7
Rollup merge of #55793 - alex:command-exec-path-regression, r=alexcri…
pietroalbini Nov 12, 2018
ed39b93
Rollup merge of #55804 - QuietMisdreavus:eager-crate-inline, r=pnkfelix
pietroalbini Nov 12, 2018
985a785
Rollup merge of #55805 - nnethercote:mv-static_assert, r=Mark-Simulacrum
pietroalbini Nov 12, 2018
68afefc
Rollup merge of #55837 - Centril:spökdata-skall-vara-strukturellt-mat…
pietroalbini Nov 12, 2018
ff06c9d
Rollup merge of #55840 - dlrobertson:fix_stage0_download, r=alexcrichton
pietroalbini Nov 12, 2018
345fbb0
Rollup merge of #55843 - Axary:master, r=sfackler
pietroalbini Nov 12, 2018
70d6c53
Rollup merge of #55852 - varkor:dotdotequals-lint, r=zackmdavis
pietroalbini Nov 12, 2018
3b4590a
Rollup merge of #55863 - dwijnand:patch-1, r=bluss
pietroalbini Nov 12, 2018
2201037
Rollup merge of #55870 - waywardmonkeys:typo-fixes, r=wesleywiser
pietroalbini Nov 12, 2018
0c6fc22
Rollup merge of #55874 - denisvasilik:docs, r=alexcrichton
pietroalbini Nov 12, 2018
35bb8bc
Rollup merge of #55879 - Xanewok:dont-panic-with-globs, r=nrc
pietroalbini Nov 12, 2018
ec3983f
Rollup merge of #55882 - hugwijst:rc_return_crate_inherent_impls, r=M…
pietroalbini Nov 12, 2018
db89347
Rollup merge of #55888 - RalfJung:alloc-extra, r=oli-obk
pietroalbini Nov 12, 2018
0532755
Rollup merge of #55889 - RalfJung:global-alloc, r=alexcrichton
pietroalbini Nov 12, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Added comment for From trait implementation: boxed string slice to St…
…ring
  • Loading branch information
denisvasilik committed Nov 11, 2018
commit 93b5112c16ec79d545826b8af1c7c27535330e77
14 changes: 14 additions & 0 deletions src/liballoc/string.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2206,6 +2206,20 @@ impl<'a> From<&'a str> for String {
#[cfg(not(test))]
#[stable(feature = "string_from_box", since = "1.18.0")]
impl From<Box<str>> for String {
/// Converts the given boxed `str` slice to a `String`.
/// It is notable that the `str` slice must be owned.
///
/// # Examples
///
/// Basic usage:
///
/// ```
/// let s1 : String = String::from("hello world");
/// let s2 : Box<str> = s1.into_boxed_str();
/// let s3 : String = String::from(s2);
///
/// assert_eq!("hello world", s3)
/// ```
fn from(s: Box<str>) -> String {
s.into_string()
}
Expand Down