Skip to content
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

Update an outdated comment in mir building #56127

Merged
merged 3 commits into from
Nov 29, 2018
Merged

Update an outdated comment in mir building #56127

merged 3 commits into from
Nov 29, 2018

Conversation

oli-obk
Copy link
Contributor

@oli-obk oli-obk commented Nov 21, 2018

r? @eddyb

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Nov 21, 2018
// In constants, temp_lifetime is None. We should not need to drop
// anything because no values with a destructor can be created in
// a constant at this time, even if the type may need dropping.
// In constants, temp_lifetime is None. We do not drop anything because
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not None except for the outermost scope. We need to keep all other drops in, to get errors about them (since they will execute in the future).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

// In constants, temp_lifetime is None. We do not drop anything because
// values with a destructor will simply be leaked in constants.
// In constants, temp_lifetime is None for temporaries that live for the
// entire constant. Thus we do not drop these temporaries and simply leak them.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not "entire constant". The semantics of shallow temporaries in the RHS of a binding is that they escape into the ambient scope. For a const/static, this ambient scope is 'static.

@eddyb
Copy link
Member

eddyb commented Nov 21, 2018

r? @nikomatsakis (just in case)

@rust-highfive rust-highfive assigned nikomatsakis and unassigned eddyb Nov 21, 2018
@nikomatsakis
Copy link
Contributor

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Nov 26, 2018

📌 Commit 925274a has been approved by nikomatsakis

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 26, 2018
kennytm added a commit to kennytm/rust that referenced this pull request Nov 27, 2018
…tsakis

Update an outdated comment in mir building

r? @eddyb
pietroalbini added a commit to pietroalbini/rust that referenced this pull request Nov 28, 2018
…tsakis

Update an outdated comment in mir building

r? @eddyb
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Nov 29, 2018
…tsakis

Update an outdated comment in mir building

r? @eddyb
bors added a commit that referenced this pull request Nov 29, 2018
Rollup of 22 pull requests

Successful merges:

 - #55391 (bootstrap: clean up a few clippy findings)
 - #56021 (avoid features_untracked)
 - #56023 (atomic::Ordering: Get rid of misleading parts of intro)
 - #56080 (Reduce the amount of bold text at doc.rlo)
 - #56114 (Enclose type in backticks for "non-exhaustive patterns" error)
 - #56124 (Fix small doc mistake on std::io::read::read_to_end)
 - #56127 (Update an outdated comment in mir building)
 - #56148 (Add rustc-guide as a submodule)
 - #56149 (Make std::os::unix/linux::fs::MetadataExt::a/m/ctime* documentation clearer)
 - #56220 (Suggest appropriate place for lifetime when declared after type arguments)
 - #56223 (Make JSON output from -Zprofile-json valid)
 - #56236 (Remove unsafe `unsafe` inner function.)
 - #56255 (Update outdated code comments in StringReader)
 - #56257 (rustc-guide has moved to rust-lang/)
 - #56273 (Add missing doc link)
 - #56289 (Fix small typo in comment of thread::stack_size)
 - #56294 (Fix a typo in the documentation of std::ffi)
 - #56312 (Deduplicate literal -> constant lowering)
 - #56319 (fix futures creating aliasing mutable and shared ref)
 - #56321 (rustdoc: add bottom margin spacing to nested lists)
 - #56322 (resolve: Fix false-positives from lint `absolute_paths_not_starting_with_crate`)
 - #56330 (Clean up span in non-trailing `..` suggestion)

Failed merges:

r? @ghost
@bors bors merged commit 925274a into master Nov 29, 2018
@matthewjasper matthewjasper deleted the oli-obk-patch-1 branch November 30, 2018 21:00
@matthewjasper matthewjasper restored the oli-obk-patch-1 branch November 30, 2018 21:00
@oli-obk oli-obk deleted the oli-obk-patch-1 branch March 18, 2019 13:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants