| Age | Commit message (Collapse) | Author | Lines |
|
|
|
- Headlines begin at 1st level now like the rest of the book
- All Headlines a blank line above and below
- Fix links in this chapter's TOC
r? @steveklabnik
|
|
The style `[name][]` does not work with Pandoc, whereas `[name]` does.
I hope hoedown accepts this as well.
|
|
- Headlines begin at 1st level now like the rest of the book
- All Headlines a blank line above and below
- Fix links in this chapter's TOC
|
|
This commit does some refactoring to make almost all of the `std::rt` private.
Specifically, the following items are no longer part of its API:
* DEFAULT_ERROR_CODE
* backtrace
* unwind
* args
* at_exit
* cleanup
* heap (this is just alloc::heap)
* min_stack
* util
The module is now tagged as `#[doc(hidden)]` as the only purpose it's serve is
an entry point for the `panic!` macro via the `begin_unwind` and
`begin_unwind_fmt` reexports.
|
|
This commit does some refactoring to make almost all of the `std::rt` private.
Specifically, the following items are no longer part of its API:
* DEFAULT_ERROR_CODE
* backtrace
* unwind
* args
* at_exit
* cleanup
* heap (this is just alloc::heap)
* min_stack
* util
The module is now tagged as `#[doc(hidden)]` as the only purpose it's serve is
an entry point for the `panic!` macro via the `begin_unwind` and
`begin_unwind_fmt` reexports.
|
|
Noticed these yesterday while reading libsyntax
|
|
|
|
|
|
r=steveklabnik
This was @steveklabnik's idea. Thanks @BurntSushi for the awesome blog post!
r? @steveklabnik
|
|
case study.
|
|
|
|
r? @steveklabnik
|
|
|
|
|
|
|
|
r? @steveklabnik
The phrase 'academic research' rubs me the wrong way. I have some concern about the role of this page and think it could be expanded to more than just academic papers and cleaned up a lot.
|
|
I took a stab at fixing #28064. Not sure if this all-features-in-one-example approach is the right one. Also I completely made up the terms "star globbing" and "brace expansion globbing" -- they are just called "glob-like syntax" in the reference.
|
|
|
|
Follow-up fix for PR #28283.
|
|
Thanks Eric, reported via email
|
|
The link address is defined below the paragraph so no need to have it inline.
|
|
r? @steveklabnik
|
|
r? @steveklabnik
|
|
|
|
Thanks Eric, reported via email
|
|
|
|
|
|
|
|
r? @steveklabnik
|
|
|
|
This is what I was talking about in https://github.com/rust-lang/rust/pull/26462#issuecomment-113883744
r? @steveklabnik
|
|
In the last code snippet on the following page there is a bug in the
implementation of Vec::drain().
https://doc.rust-lang.org/nightly/nomicon/vec-drain.html
```rust
pub fn drain(&mut self) -> Drain<T> {
// Oops, setting it to 0 while we still need the old value!
self.len = 0;
unsafe {
Drain {
// len is used to create a &[T] from &self here,
// so we end up always creating an empty slice.
iter: RawValIter::new(&self),
vec: PhantomData,
}
}
}
```
A simple test to verify that Drain is broken can be found here:
https://play.rust-lang.org/?gist=30f579565e4bbf4836ce&version=nightly
And here's one with a fixed implementation:
https://play.rust-lang.org/?gist=2ec0c1a6dcf5defd7a53&version=nightly
|
|
|
|
|
|
|
|
|
|
In the last code snippet on the following page there is a bug in the
implementation of Vec::drain().
https://doc.rust-lang.org/nightly/nomicon/vec-drain.html
```rust
pub fn drain(&mut self) -> Drain<T> {
// Oops, setting it to 0 while we still need the old value!
self.len = 0;
unsafe {
Drain {
// len is used to create a &[T] from &self here,
// so we end up always creating an empty slice.
iter: RawValIter::new(&self),
vec: PhantomData,
}
}
}
```
A simple test to verify that Drain is broken can be found here:
https://play.rust-lang.org/?gist=30f579565e4bbf4836ce&version=nightly
And here's one with a fixed implementation:
https://play.rust-lang.org/?gist=2ec0c1a6dcf5defd7a53&version=nightly
|
|
|
|
|
|
|
|
r? @steveklabnik
|
|
I took a stab at fixing #28064. Not sure if this all-features-in-one-example approach is the right one. Also I completely made up the terms "star globbing" and "brace expansion globbing" -- they are just called "glob-like syntax" in the reference.
|
|
|
|
|
|
|
|
This is a docs change suggested in #28196.
r? @steveklabnik
|
|
extern_block should be extern_block_item.
extern_block_item is `extern { bunch of fns }`, extern_block is just `bunch of fns`
r? @steveklabnik
|
|
Also, add missing comma
|
|
|