Fewer early errors.
`build_session` is passed an `EarlyErrorHandler` and then constructs a `Handler`. But the `EarlyErrorHandler` is still used for some time after that. This commit changes `build_session` so it consumes the passed `EarlyErrorHandler`, and also drops it as soon as the `Handler` is built. As a result, `parse_cfg` and `parse_check_cfg` now take a `Handler` instead of an `EarlyErrorHandler`.
This commit is contained in:
@@ -444,3 +444,9 @@ pub(crate) struct FunctionReturnRequiresX86OrX8664;
|
||||
#[derive(Diagnostic)]
|
||||
#[diag(session_function_return_thunk_extern_requires_non_large_code_model)]
|
||||
pub(crate) struct FunctionReturnThunkExternRequiresNonLargeCodeModel;
|
||||
|
||||
#[derive(Diagnostic)]
|
||||
#[diag(session_failed_to_create_profiler)]
|
||||
pub struct FailedToCreateProfiler {
|
||||
pub err: String,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user