| Age | Commit message (Collapse) | Author | Lines |
|
|
|
Fix spacing style of `T: Bound` in docs
The space between `T` and `Bound` is the typical style used in code and
produced by rustdoc's rendering. Fixed first in Reflect's docs and then
I fixed all occurrences in docs I could find.
|
|
The space between `T` and `Bound` is the typical style used in code and
produced by rustdoc's rendering. Fixed first in Reflect's docs and then
I fixed all occurrences in docs I could find.
|
|
|
|
* Moved semicolon to the right place in the `let` statement in the ZST section.
* Fixed the missing ZST additions for `RawValIter<T>` from this section in the final code section.
|
|
Add support to use functions exported using vectorcall.
This essentially only allows to pass a new LLVM calling convention
from rust to LLVM.
```rust
extern "vectorcall" fn abc(param: c_void);
```
references
----
http://llvm.org/docs/doxygen/html/CallingConv_8h_source.html
https://msdn.microsoft.com/en-us/library/dn375768.aspx
|
|
|
|
|
|
|
|
Ref issue [30825](https://github.com/rust-lang/rust/issues/30825)
This commit should suffice to add a concise introduction to the concept of crates.
My only worry, is that it is maybe too concise; but, the book seems to be written with the understanding that the new Rust user is coming from another language, and so will understand what a Library or Code Package is.
|
|
This adds support for big endian and little endian PowerPC64.
make check runs clean apart from one big endian backtrace issue.
|
|
* ref: Issue #30825
Small punctuation change in "Crates and Modules".
|
|
Also, whitespace fixes
|
|
This feature is partially stabilized, so describe each part in the appropriate place.
r? @alexcrichton @brson
It would be nice to backport this to beta, since this is the first release where this is true. I try really hard to not do doc backports, but this isn't very large, and might be worth making an exception, I dunno.
|
|
This also repeats the case analysis used.
|
|
Also, whitespace fixes
|
|
This feature is partially stabilized, so describe each part in the appropriate place.
|
|
r? @steveklabnik
|
|
r? @steveklabnik
|
|
Fixes #30819
|
|
|
|
|
|
This adds support for big endian and little endian PowerPC64.
make check runs clean apart from one big endian backtrace issue.
|
|
|
|
Fixes #30819
|
|
These are the same descriptions as on the website.
re https://www.reddit.com/r/rust/comments/409nlo/i_just_noticed_the_docs_nightly_all_docs_got_more/cytc4ab
r? @steveklabnik
|
|
r? @steveklabnik
|
|
These are the same descriptions as on the website.
|
|
|
|
|
|
Doing so is considered weaker writing. Thanks @Charlotteis!
Fixes #28810
|
|
|
|
len needs to be prefixed by self for this to work. That is something which trips me up all the time. It's reassuring to see that happening to seasoned Rust programmers.
|
|
I'm working my way through TRPL beginning at "Syntax and Semantics" as was recommended in a previous version.
I'm expecting the chapter to incrementally build up my knowledge of the language section by section, assuming no prior Rust experience. So it was a bit of a speed-bump to encounter references and the vector type in a code example long before they had been defined and explained.
Another commit in this PR tries to make consistent what is a "chapter" of TRPL versus a "section." Just a nit-pick, but not thinking about that stuff keeps my focus on the important material.
My background: Python programmer since ~2000, with moderate exposure to C, C++, assembly, operating systems, and system architecture in university several years ago.
For your kind consideration, feel welcome to use or drop or rework any part of this.
|
|
|
|
section of the book is correct.
|
|
|
|
|
|
In a straight-through read of "Syntax and Semantics," the concept of a
"reference" is used here before it is explained. Mention that and link to
the section explaining references.
|
|
In a straight-through read of "Syntax and Semantics," the first time we
meet a generic, and the first time we meet a vector, is when a Vec<T> shows
up in this example. I'm not sure that I could argue that the whole section
should appear later in the book than the ones on vectors and generics, so
instead just give the reader a brief introduction to both and a promise to
follow up later.
|
|
r=steveklabnik
heap::deallocate expects a *mut u8, but here a *mut T is given as the type of the argument. This would not compile. The final code is correct, however.
|
|
Rust differs in that behavior from C: In C, the newline escapes are resolved
before anything else, and in Rust this depends on whether the backslash is
escaped itself.
A difference can be observed in the following two programs:
```c
int main()
{
printf("\\
n\n");
return 0;
}
```
```rust
fn main() {
println!("\\
n");
}
```
The first program prints two newlines, the second one prints a backslash, a
newline, the latin character n and a final newline.
|
|
Declare what LIFO stands for
|
|
Fixes #30254
|
|
I noticed the alignment was off in the error handling part of the book. This was caused because two tabs had crept into the file. I have changed these for spaces.
|
|
code is correct, the example here would not compile without the cast. I used *mut _ instead of *mut u8 to be consistent with the final code.
|
|
|
|
Rust differs in that behavior from C: In C, the newline escapes are resolved
before anything else, and in Rust this depends on whether the backslash is
escaped itself.
A difference can be observed in the following two programs:
```c
#include <stdio.h>
int main()
{
printf("\\
n\n");
return 0;
}
```
```rust
fn main() {
println!("\\
n");
}
```
The first program prints two newlines, the second one prints a backslash, a
newline, the latin character n and a final newline.
|
|
Declare what LIFO stands for
|
|
This also repeated the case analysis used.
|