Skip to content

Conversation

lawrencewoodman and others added 19 commits January 3, 2016 08:15
Declare what LIFO stands for
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.
The fundamental problem of duplication was fixed in rust-lang#10891, but the comment was preserved. Closes rust-lang#9762.
…nal 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.
…bnik

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.
…eklabnik

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.
The fundamental problem of duplication was fixed in rust-lang#10891, but the comment was preserved. Closes rust-lang#9762.
…er_type, 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.
@steveklabnik
Copy link
Contributor Author

@bors: r+ p=1

@bors
Copy link
Collaborator

bors commented Jan 6, 2016

📌 Commit 6cca775 has been approved by steveklabnik

@rust-highfive
Copy link
Contributor

r? @Manishearth

(rust_highfive has picked a reviewer for you, use r? to override)

@bors
Copy link
Collaborator

bors commented Jan 6, 2016

⌛ Testing commit 6cca775 with merge 43403b4...

bors added a commit that referenced this pull request Jan 6, 2016
@bors bors merged commit 6cca775 into rust-lang:master Jan 7, 2016
@Centril Centril added the rollup A PR which is a rollup label Oct 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

rollup A PR which is a rollup

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants