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

RFC: Backtrace in core #3156

Closed
wants to merge 16 commits into from

Conversation

JDuchniewicz
Copy link

@JDuchniewicz JDuchniewicz commented Jul 29, 2021

Rendered
Based on Backtrace in core PR.

Remaining concerns:

  • Check if impl Backtrace return type works with backtrace_create()
  • Address more abstract pointer to Backtrace type - increase size from 1 word to 2 words
  • Clarify weak lang items
  • Why use struct instead of trait

0000-backtrace-in-core.md Outdated Show resolved Hide resolved
0000-backtrace-in-core.md Outdated Show resolved Hide resolved
0000-backtrace-in-core.md Outdated Show resolved Hide resolved
0000-backtrace-in-core.md Outdated Show resolved Hide resolved
0000-backtrace-in-core.md Outdated Show resolved Hide resolved
0000-backtrace-in-core.md Outdated Show resolved Hide resolved
0000-backtrace-in-core.md Outdated Show resolved Hide resolved
0000-backtrace-in-core.md Show resolved Hide resolved
0000-backtrace-in-core.md Outdated Show resolved Hide resolved
0000-backtrace-in-core.md Outdated Show resolved Hide resolved
@yaahc yaahc added A-error-handling Proposals relating to error handling. PG-error-handling Project Group: Error handling (https://github.com/rust-lang/project-error-handling) T-libs-api Relevant to the library API team, which will review and decide on the RFC. labels Aug 2, 2021
0000-backtrace-in-core.md Outdated Show resolved Hide resolved
#[cfg(not(bootstrap))]
extern "Rust" {
#[lang = "backtrace_create"]
fn backtrace_create(ip: usize) -> *mut dyn RawBacktrace;
Copy link
Member

Choose a reason for hiding this comment

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

@nrc I don't think we can use Box with this destined for core. Also, I'm not sure what you mean by impl Backtrace here. If you mean fn backtrace_create(ip: usize) -> impl Backtrace then I'd be surprised if that works, though I'm not super experienced with extern "Rust" so maybe its fine to have a generic type here.

0000-backtrace-in-core.md Show resolved Hide resolved
0000-backtrace-in-core.md Outdated Show resolved Hide resolved
0000-backtrace-in-core.md Outdated Show resolved Hide resolved
0000-backtrace-in-core.md Outdated Show resolved Hide resolved
0000-backtrace-in-core.md Outdated Show resolved Hide resolved
0000-backtrace-in-core.md Outdated Show resolved Hide resolved
0000-backtrace-in-core.md Outdated Show resolved Hide resolved
0000-backtrace-in-core.md Outdated Show resolved Hide resolved
0000-backtrace-in-core.md Outdated Show resolved Hide resolved
0000-backtrace-in-core.md Outdated Show resolved Hide resolved
0000-backtrace-in-core.md Outdated Show resolved Hide resolved
0000-backtrace-in-core.md Outdated Show resolved Hide resolved
0000-backtrace-in-core.md Outdated Show resolved Hide resolved
0000-backtrace-in-core.md Outdated Show resolved Hide resolved
0000-backtrace-in-core.md Outdated Show resolved Hide resolved
@Aaron1011
Copy link
Member

What's the current status of this RFC?

@yaahc
Copy link
Member

yaahc commented Feb 9, 2022

What's the current status of this RFC?

The current status is that we don't intend to merge this RFC. It was written as one of the potential paths to moving error into core assuming generic member access didn't work out but at this point it seems extremely likely that we will merge the generic member access RFC once we finish the provider RFC. That RFC provides a superset of the functionality provided by fn backtrace() making it unnecessary. Once we have generic member access we will remove fn backtrace and immediately move Error into core.

For context:

@nikomatsakis
Copy link
Contributor

@yaahc shall we close it, then?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-error-handling Proposals relating to error handling. PG-error-handling Project Group: Error handling (https://github.com/rust-lang/project-error-handling) T-libs-api Relevant to the library API team, which will review and decide on the RFC.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants