Skip to content

Rollup of 10 pull requests #26150

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

Merged
merged 21 commits into from
Jun 9, 2015
Merged

Rollup of 10 pull requests #26150

merged 21 commits into from
Jun 9, 2015

Conversation

alexcrichton and others added 21 commits June 3, 2015 15:24
On MSVC there are two ways that the CRT can be linked, either statically or
dynamically. Each object file produced by the compiler is compiled against
msvcrt (a dll) or libcmt (a static library). When the linker is dealing with
more than one object file, it requires that all object files link to the same
CRT, or else the linker will spit out some errors.

For now, compile code with `-MD` as it seems to appear more often in C libraries
so we'll stick with the same trend.
The text claimed 'any borrow must last for a _smaller_ scope than the
owner', however the accurate way of describing the comparison is
inclusive (i.e., 'less than or equal to' vs. 'less than').
On MSVC there are two ways that the CRT can be linked, either statically or
dynamically. Each object file produced by the compiler is compiled against
msvcrt (a dll) or libcmt (a static library). When the linker is dealing with
more than one object file, it requires that all object files link to the same
CRT, or else the linker will spit out some errors.

For now, compile code with `-MD` as it seems to appear more often in C libraries
so we'll stick with the same trend.
This obscures more than it helps.

Fixes rust-lang#25573
After talking with @graydon on #rust-internals, this is hopefully clarifying.

Fixes rust-lang#25586
As this example got changed, we stopped showing how to return self as
the first example, so this text is outdated.

Fixes rust-lang#25803
The text claimed 'any borrow must last for a _smaller_ scope than the
owner', however the accurate way of describing the comparison is
inclusive (i.e., 'less than or equal to' vs. 'less than').
…chton

Hi, I think the comments are wrong in the example and this PR offers my suggested fix.
…crichton

Hi, I think the second example fails rule 3 described immediately above. This PR fixes that.
After talking with @graydon on #rust-internals, this is hopefully clarifying.

Fixes rust-lang#25586

@mkpankov, what do you think?
As this example got changed, we stopped showing how to return self as
the first example, so this text is outdated.

Fixes rust-lang#25803
…crichton

Fixes rust-lang#25851

I am 99% sure this is true for all `static`s and not just `static mut`, yes?
@rust-highfive
Copy link
Contributor

r? @pcwalton

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

@steveklabnik
Copy link
Member Author

@bors: r+ p=100

@bors
Copy link
Collaborator

bors commented Jun 9, 2015

📌 Commit 6b6b380 has been approved by steveklabnik

@steveklabnik steveklabnik assigned steveklabnik and unassigned pcwalton Jun 9, 2015
@bors
Copy link
Collaborator

bors commented Jun 9, 2015

⌛ Testing commit 6b6b380 with merge ac67354...

bors added a commit that referenced this pull request Jun 9, 2015
@bors bors merged commit 6b6b380 into rust-lang:master Jun 9, 2015
@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.

9 participants