-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
Lifetimes can escape in traits / objects #5723
Copy link
Copy link
Closed
Labels
A-lifetimesArea: Lifetimes / regionsArea: Lifetimes / regionsI-crashIssue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.Issue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.P-mediumMedium priorityMedium priority
Milestone
Metadata
Metadata
Assignees
Labels
A-lifetimesArea: Lifetimes / regionsArea: Lifetimes / regionsI-crashIssue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.Issue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.P-mediumMedium priorityMedium priority
Type
Fields
Give feedbackNo fields configured for issues without a type.
This code from the
iolibrary is definitely wrong as the lifetime of the parametersis lost:The lifetime of the
sis lost. I have a fix for this in a branch I want to land (currently commented out with a FIXME) but I don't want to turn on the check because to do this right we need&objects working. I'm not even sure where to insert strategic transmutes to getwith_str_readerworking.This signature for example should really be:
or even
There is a test that was supposed to be defending against this case, but it was basically accidentally reporting an error.