rustup: update to nightly-2021-09-29.

This commit is contained in:
Eduard-Mihai Burtescu 2021-09-29 11:55:21 +03:00 committed by Eduard-Mihai Burtescu
parent 35172f7edb
commit 6780432b37
23 changed files with 401 additions and 308 deletions

View File

@ -9,18 +9,17 @@ use rustc_data_structures::fx::FxHashMap;
use rustc_errors::ErrorReported; use rustc_errors::ErrorReported;
use rustc_index::vec::Idx; use rustc_index::vec::Idx;
use rustc_middle::bug; use rustc_middle::bug;
use rustc_middle::ty::layout::{FnAbiExt, TyAndLayout}; use rustc_middle::ty::layout::{FnAbiOf, LayoutOf, TyAndLayout};
use rustc_middle::ty::subst::SubstsRef; use rustc_middle::ty::subst::SubstsRef;
use rustc_middle::ty::{ use rustc_middle::ty::{
Const, FloatTy, GeneratorSubsts, IntTy, ParamEnv, PolyFnSig, Ty, TyKind, TypeAndMut, UintTy, self, Const, FloatTy, GeneratorSubsts, IntTy, ParamEnv, PolyFnSig, Ty, TyKind, TypeAndMut,
UintTy,
}; };
use rustc_span::def_id::DefId; use rustc_span::def_id::DefId;
use rustc_span::Span; use rustc_span::Span;
use rustc_span::DUMMY_SP; use rustc_span::DUMMY_SP;
use rustc_target::abi::call::{CastTarget, FnAbi, PassMode, Reg, RegKind}; use rustc_target::abi::call::{CastTarget, FnAbi, PassMode, Reg, RegKind};
use rustc_target::abi::{ use rustc_target::abi::{Abi, Align, FieldsShape, Primitive, Scalar, Size, VariantIdx, Variants};
Abi, Align, FieldsShape, LayoutOf, Primitive, Scalar, Size, VariantIdx, Variants,
};
use std::cell::RefCell; use std::cell::RefCell;
use std::collections::hash_map::Entry; use std::collections::hash_map::Entry;
use std::fmt; use std::fmt;
@ -150,13 +149,17 @@ impl<'tcx> ConvSpirvType<'tcx> for PointeeTy<'tcx> {
fn spirv_type(&self, span: Span, cx: &CodegenCx<'tcx>) -> Word { fn spirv_type(&self, span: Span, cx: &CodegenCx<'tcx>) -> Word {
match *self { match *self {
PointeeTy::Ty(ty) => ty.spirv_type(span, cx), PointeeTy::Ty(ty) => ty.spirv_type(span, cx),
PointeeTy::Fn(ty) => FnAbi::of_fn_ptr(cx, ty, &[]).spirv_type(span, cx), PointeeTy::Fn(ty) => cx
.fn_abi_of_fn_ptr(ty, ty::List::empty())
.spirv_type(span, cx),
} }
} }
fn spirv_type_immediate(&self, span: Span, cx: &CodegenCx<'tcx>) -> Word { fn spirv_type_immediate(&self, span: Span, cx: &CodegenCx<'tcx>) -> Word {
match *self { match *self {
PointeeTy::Ty(ty) => ty.spirv_type_immediate(span, cx), PointeeTy::Ty(ty) => ty.spirv_type_immediate(span, cx),
PointeeTy::Fn(ty) => FnAbi::of_fn_ptr(cx, ty, &[]).spirv_type_immediate(span, cx), PointeeTy::Fn(ty) => cx
.fn_abi_of_fn_ptr(ty, ty::List::empty())
.spirv_type_immediate(span, cx),
} }
} }
} }

View File

@ -476,11 +476,6 @@ impl<'tcx> Visitor<'tcx> for CheckSpirvAttrVisitor<'tcx> {
intravisit::walk_variant(self, variant, generics, item_id); intravisit::walk_variant(self, variant, generics, item_id);
} }
fn visit_macro_def(&mut self, macro_def: &'tcx hir::MacroDef<'tcx>) {
self.check_spirv_attributes(macro_def.hir_id(), Target::MacroDef);
intravisit::walk_macro_def(self, macro_def);
}
fn visit_param(&mut self, param: &'tcx hir::Param<'tcx>) { fn visit_param(&mut self, param: &'tcx hir::Param<'tcx>) {
self.check_spirv_attributes(param.hir_id, Target::Param); self.check_spirv_attributes(param.hir_id, Target::Param);
@ -488,15 +483,6 @@ impl<'tcx> Visitor<'tcx> for CheckSpirvAttrVisitor<'tcx> {
} }
} }
fn check_invalid_macro_level_spirv_attr(tcx: TyCtxt<'_>, sym: &Symbols, attrs: &[Attribute]) {
for attr in attrs {
if attr.has_name(sym.spirv) {
tcx.sess
.span_err(attr.span, "#[spirv(..)] cannot be applied to a macro");
}
}
}
// FIXME(eddyb) DRY this somehow and make it reusable from somewhere in `rustc`. // FIXME(eddyb) DRY this somehow and make it reusable from somewhere in `rustc`.
fn check_mod_attrs(tcx: TyCtxt<'_>, module_def_id: LocalDefId) { fn check_mod_attrs(tcx: TyCtxt<'_>, module_def_id: LocalDefId) {
let check_spirv_attr_visitor = &mut CheckSpirvAttrVisitor { let check_spirv_attr_visitor = &mut CheckSpirvAttrVisitor {
@ -507,13 +493,6 @@ fn check_mod_attrs(tcx: TyCtxt<'_>, module_def_id: LocalDefId) {
module_def_id, module_def_id,
&mut check_spirv_attr_visitor.as_deep_visitor(), &mut check_spirv_attr_visitor.as_deep_visitor(),
); );
tcx.hir()
.visit_exported_macros_in_krate(check_spirv_attr_visitor);
check_invalid_macro_level_spirv_attr(
tcx,
&check_spirv_attr_visitor.sym,
tcx.hir().krate().non_exported_macro_attrs,
);
if module_def_id.is_top_level_module() { if module_def_id.is_top_level_module() {
check_spirv_attr_visitor.check_spirv_attributes(CRATE_HIR_ID, Target::Mod); check_spirv_attr_visitor.check_spirv_attributes(CRATE_HIR_ID, Target::Mod);
} }

View File

@ -16,10 +16,9 @@ use rustc_codegen_ssa::MemFlags;
use rustc_middle::bug; use rustc_middle::bug;
use rustc_middle::ty::Ty; use rustc_middle::ty::Ty;
use rustc_span::Span; use rustc_span::Span;
use rustc_target::abi::{Abi, Align, Scalar, Size}; use rustc_target::abi::{Abi, Align, Scalar, Size, WrappingRange};
use std::convert::TryInto; use std::convert::TryInto;
use std::iter::{self, empty}; use std::iter::{self, empty};
use std::ops::Range;
macro_rules! simple_op { macro_rules! simple_op {
( (
@ -794,7 +793,7 @@ impl<'a, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'tcx> {
// silly clippy, we can't rename this! // silly clippy, we can't rename this!
#[allow(clippy::wrong_self_convention)] #[allow(clippy::wrong_self_convention)]
fn to_immediate_scalar(&mut self, val: Self::Value, scalar: &Scalar) -> Self::Value { fn to_immediate_scalar(&mut self, val: Self::Value, scalar: Scalar) -> Self::Value {
if scalar.is_bool() { if scalar.is_bool() {
let bool = SpirvType::Bool.def(self.span(), self); let bool = SpirvType::Bool.def(self.span(), self);
return self.trunc(val, bool); return self.trunc(val, bool);
@ -982,7 +981,7 @@ impl<'a, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'tcx> {
self self
} }
fn range_metadata(&mut self, _load: Self::Value, _range: Range<u128>) { fn range_metadata(&mut self, _load: Self::Value, _range: WrappingRange) {
// ignore // ignore
} }

View File

@ -8,11 +8,11 @@ use rustc_codegen_ssa::mir::operand::OperandRef;
use rustc_codegen_ssa::mir::place::PlaceRef; use rustc_codegen_ssa::mir::place::PlaceRef;
use rustc_codegen_ssa::traits::{BuilderMethods, IntrinsicCallMethods}; use rustc_codegen_ssa::traits::{BuilderMethods, IntrinsicCallMethods};
use rustc_middle::bug; use rustc_middle::bug;
use rustc_middle::ty::layout::LayoutOf;
use rustc_middle::ty::{FnDef, Instance, ParamEnv, Ty, TyKind}; use rustc_middle::ty::{FnDef, Instance, ParamEnv, Ty, TyKind};
use rustc_span::source_map::Span; use rustc_span::source_map::Span;
use rustc_span::sym; use rustc_span::sym;
use rustc_target::abi::call::{FnAbi, PassMode}; use rustc_target::abi::call::{FnAbi, PassMode};
use rustc_target::abi::LayoutOf;
fn int_type_width_signed(ty: Ty<'_>, cx: &CodegenCx<'_>) -> Option<(u64, bool)> { fn int_type_width_signed(ty: Ty<'_>, cx: &CodegenCx<'_>) -> Option<(u64, bool)> {
match ty.kind() { match ty.kind() {

View File

@ -24,12 +24,15 @@ use rustc_errors::DiagnosticBuilder;
use rustc_middle::mir::coverage::{ use rustc_middle::mir::coverage::{
CodeRegion, CounterValueReference, ExpressionOperandId, InjectedExpressionId, Op, CodeRegion, CounterValueReference, ExpressionOperandId, InjectedExpressionId, Op,
}; };
use rustc_middle::ty::layout::{HasParamEnv, HasTyCtxt, TyAndLayout}; use rustc_middle::ty::layout::{
FnAbiError, FnAbiOfHelpers, FnAbiRequest, HasParamEnv, HasTyCtxt, LayoutError, LayoutOfHelpers,
TyAndLayout,
};
use rustc_middle::ty::{Instance, ParamEnv, Ty, TyCtxt}; use rustc_middle::ty::{Instance, ParamEnv, Ty, TyCtxt};
use rustc_span::def_id::DefId; use rustc_span::def_id::DefId;
use rustc_span::source_map::Span; use rustc_span::source_map::Span;
use rustc_target::abi::call::{ArgAbi, FnAbi, PassMode}; use rustc_target::abi::call::{ArgAbi, FnAbi, PassMode};
use rustc_target::abi::{HasDataLayout, LayoutOf, Size, TargetDataLayout}; use rustc_target::abi::{HasDataLayout, Size, TargetDataLayout};
use rustc_target::spec::{HasTargetSpec, Target}; use rustc_target::spec::{HasTargetSpec, Target};
use std::ops::Deref; use std::ops::Deref;
@ -389,11 +392,25 @@ impl<'a, 'tcx> HasDataLayout for Builder<'a, 'tcx> {
} }
} }
impl<'a, 'tcx> LayoutOf for Builder<'a, 'tcx> { impl<'tcx> LayoutOfHelpers<'tcx> for Builder<'_, 'tcx> {
type Ty = Ty<'tcx>; type LayoutOfResult = TyAndLayout<'tcx>;
type TyAndLayout = TyAndLayout<'tcx>;
fn layout_of(&self, ty: Ty<'tcx>) -> Self::TyAndLayout { #[inline]
self.cx.layout_of(ty) fn handle_layout_err(&self, err: LayoutError<'tcx>, span: Span, ty: Ty<'tcx>) -> ! {
self.cx.handle_layout_err(err, span, ty)
}
}
impl<'tcx> FnAbiOfHelpers<'tcx> for Builder<'_, 'tcx> {
type FnAbiOfResult = &'tcx FnAbi<'tcx, Ty<'tcx>>;
#[inline]
fn handle_fn_abi_err(
&self,
err: FnAbiError<'tcx>,
span: Span,
fn_abi_request: FnAbiRequest<'tcx>,
) -> ! {
self.cx.handle_fn_abi_err(err, span, fn_abi_request)
} }
} }

View File

@ -6,12 +6,13 @@ use rspirv::spirv::Word;
use rustc_codegen_ssa::mir::place::PlaceRef; use rustc_codegen_ssa::mir::place::PlaceRef;
use rustc_codegen_ssa::traits::{BaseTypeMethods, ConstMethods, MiscMethods, StaticMethods}; use rustc_codegen_ssa::traits::{BaseTypeMethods, ConstMethods, MiscMethods, StaticMethods};
use rustc_middle::bug; use rustc_middle::bug;
use rustc_middle::mir::interpret::{alloc_range, Allocation, GlobalAlloc, ScalarMaybeUninit}; use rustc_middle::mir::interpret::{
use rustc_middle::ty::layout::TyAndLayout; alloc_range, Allocation, GlobalAlloc, Scalar, ScalarMaybeUninit,
use rustc_mir::interpret::Scalar; };
use rustc_middle::ty::layout::{LayoutOf, TyAndLayout};
use rustc_span::symbol::Symbol; use rustc_span::symbol::Symbol;
use rustc_span::{Span, DUMMY_SP}; use rustc_span::{Span, DUMMY_SP};
use rustc_target::abi::{self, AddressSpace, HasDataLayout, Integer, LayoutOf, Primitive, Size}; use rustc_target::abi::{self, AddressSpace, HasDataLayout, Integer, Primitive, Size};
impl<'tcx> CodegenCx<'tcx> { impl<'tcx> CodegenCx<'tcx> {
pub fn constant_u8(&self, span: Span, val: u8) -> SpirvValue { pub fn constant_u8(&self, span: Span, val: u8) -> SpirvValue {
@ -207,7 +208,7 @@ impl<'tcx> ConstMethods<'tcx> for CodegenCx<'tcx> {
fn scalar_to_backend( fn scalar_to_backend(
&self, &self,
scalar: Scalar, scalar: Scalar,
layout: &abi::Scalar, layout: abi::Scalar,
ty: Self::Type, ty: Self::Type,
) -> Self::Value { ) -> Self::Value {
match scalar { match scalar {
@ -426,7 +427,7 @@ impl<'tcx> CodegenCx<'tcx> {
// tldr, the pointer here is only needed for the offset // tldr, the pointer here is only needed for the offset
let value = match alloc.read_scalar(self, alloc_range(*offset, size)).unwrap() { let value = match alloc.read_scalar(self, alloc_range(*offset, size)).unwrap() {
ScalarMaybeUninit::Scalar(scalar) => { ScalarMaybeUninit::Scalar(scalar) => {
self.scalar_to_backend(scalar, &self.primitive_to_scalar(primitive), ty) self.scalar_to_backend(scalar, self.primitive_to_scalar(primitive), ty)
} }
ScalarMaybeUninit::Uninit => self.undef(ty), ScalarMaybeUninit::Uninit => self.undef(ty),
}; };

View File

@ -9,12 +9,11 @@ use rustc_codegen_ssa::traits::{BaseTypeMethods, PreDefineMethods, StaticMethods
use rustc_middle::bug; use rustc_middle::bug;
use rustc_middle::middle::codegen_fn_attrs::{CodegenFnAttrFlags, CodegenFnAttrs}; use rustc_middle::middle::codegen_fn_attrs::{CodegenFnAttrFlags, CodegenFnAttrs};
use rustc_middle::mir::mono::{Linkage, MonoItem, Visibility}; use rustc_middle::mir::mono::{Linkage, MonoItem, Visibility};
use rustc_middle::ty::layout::FnAbiExt; use rustc_middle::ty::layout::{FnAbiOf, LayoutOf};
use rustc_middle::ty::{self, Instance, ParamEnv, TypeFoldable}; use rustc_middle::ty::{self, Instance, ParamEnv, TypeFoldable};
use rustc_span::def_id::DefId; use rustc_span::def_id::DefId;
use rustc_span::Span; use rustc_span::Span;
use rustc_target::abi::call::FnAbi; use rustc_target::abi::Align;
use rustc_target::abi::{Align, LayoutOf};
fn attrs_to_spirv(attrs: &CodegenFnAttrs) -> FunctionControl { fn attrs_to_spirv(attrs: &CodegenFnAttrs) -> FunctionControl {
let mut control = FunctionControl::NONE; let mut control = FunctionControl::NONE;
@ -58,7 +57,7 @@ impl<'tcx> CodegenCx<'tcx> {
// PreDefineMethods::predefine_fn -> declare_fn_ext // PreDefineMethods::predefine_fn -> declare_fn_ext
fn declare_fn_ext(&self, instance: Instance<'tcx>, linkage: Option<LinkageType>) -> SpirvValue { fn declare_fn_ext(&self, instance: Instance<'tcx>, linkage: Option<LinkageType>) -> SpirvValue {
let control = attrs_to_spirv(self.tcx.codegen_fn_attrs(instance.def_id())); let control = attrs_to_spirv(self.tcx.codegen_fn_attrs(instance.def_id()));
let fn_abi = FnAbi::of_instance(self, instance, &[]); let fn_abi = self.fn_abi_of_instance(instance, ty::List::empty());
let span = self.tcx.def_span(instance.def_id()); let span = self.tcx.def_span(instance.def_id());
let function_type = fn_abi.spirv_type(span, self); let function_type = fn_abi.spirv_type(span, self);
let (return_type, argument_types) = match self.lookup_type(function_type) { let (return_type, argument_types) = match self.lookup_type(function_type) {
@ -116,7 +115,7 @@ impl<'tcx> CodegenCx<'tcx> {
.as_ref() .as_ref()
.map(ToString::to_string) .map(ToString::to_string)
.unwrap_or_else(|| instance.to_string()); .unwrap_or_else(|| instance.to_string());
self.entry_stub(&instance, &fn_abi, declared, entry_name, entry); self.entry_stub(&instance, fn_abi, declared, entry_name, entry);
} }
if attrs.unroll_loops.is_some() { if attrs.unroll_loops.is_some() {
self.unroll_loops_decorations.borrow_mut().insert(fn_id); self.unroll_loops_decorations.borrow_mut().insert(fn_id);

View File

@ -11,12 +11,12 @@ use rspirv::spirv::{
use rustc_codegen_ssa::traits::{BaseTypeMethods, BuilderMethods}; use rustc_codegen_ssa::traits::{BaseTypeMethods, BuilderMethods};
use rustc_data_structures::fx::FxHashMap; use rustc_data_structures::fx::FxHashMap;
use rustc_hir as hir; use rustc_hir as hir;
use rustc_middle::ty::layout::TyAndLayout; use rustc_middle::ty::layout::{LayoutOf, TyAndLayout};
use rustc_middle::ty::{Instance, Ty, TyKind}; use rustc_middle::ty::{Instance, Ty, TyKind};
use rustc_span::Span; use rustc_span::Span;
use rustc_target::abi::{ use rustc_target::abi::{
call::{ArgAbi, ArgAttribute, ArgAttributes, FnAbi, PassMode}, call::{ArgAbi, ArgAttribute, ArgAttributes, FnAbi, PassMode},
LayoutOf, Size, Size,
}; };
impl<'tcx> CodegenCx<'tcx> { impl<'tcx> CodegenCx<'tcx> {

View File

@ -4,31 +4,65 @@ use crate::spirv_type::SpirvType;
use rspirv::spirv::Word; use rspirv::spirv::Word;
use rustc_codegen_ssa::common::TypeKind; use rustc_codegen_ssa::common::TypeKind;
use rustc_codegen_ssa::traits::{BaseTypeMethods, LayoutTypeMethods}; use rustc_codegen_ssa::traits::{BaseTypeMethods, LayoutTypeMethods};
use rustc_middle::bug; use rustc_middle::ty::layout::{
use rustc_middle::ty::layout::{LayoutError, TyAndLayout}; FnAbiError, FnAbiOfHelpers, FnAbiRequest, LayoutError, LayoutOfHelpers, TyAndLayout,
use rustc_middle::ty::{ParamEnv, Ty}; };
use rustc_middle::ty::Ty;
use rustc_middle::{bug, span_bug};
use rustc_span::source_map::{Span, DUMMY_SP}; use rustc_span::source_map::{Span, DUMMY_SP};
use rustc_target::abi::call::{CastTarget, FnAbi, Reg}; use rustc_target::abi::call::{CastTarget, FnAbi, Reg};
use rustc_target::abi::{Abi, AddressSpace, FieldsShape, LayoutOf}; use rustc_target::abi::{Abi, AddressSpace, FieldsShape};
impl<'tcx> LayoutOf for CodegenCx<'tcx> { impl<'tcx> LayoutOfHelpers<'tcx> for CodegenCx<'tcx> {
type Ty = Ty<'tcx>; type LayoutOfResult = TyAndLayout<'tcx>;
type TyAndLayout = TyAndLayout<'tcx>;
fn layout_of(&self, ty: Ty<'tcx>) -> Self::TyAndLayout { #[inline]
self.spanned_layout_of(ty, DUMMY_SP) fn handle_layout_err(&self, err: LayoutError<'tcx>, span: Span, ty: Ty<'tcx>) -> ! {
} if let LayoutError::SizeOverflow(_) = err {
self.tcx.sess.span_fatal(span, &err.to_string())
fn spanned_layout_of(&self, ty: Ty<'tcx>, span: Span) -> Self::TyAndLayout {
self.tcx
.layout_of(ParamEnv::reveal_all().and(ty))
.unwrap_or_else(|e| {
if let LayoutError::SizeOverflow(_) = e {
self.tcx.sess.span_fatal(span, &e.to_string())
} else { } else {
bug!("failed to get layout for `{}`: {}", ty, e) span_bug!(span, "failed to get layout for `{}`: {}", ty, err)
}
}
}
impl<'tcx> FnAbiOfHelpers<'tcx> for CodegenCx<'tcx> {
type FnAbiOfResult = &'tcx FnAbi<'tcx, Ty<'tcx>>;
#[inline]
fn handle_fn_abi_err(
&self,
err: FnAbiError<'tcx>,
span: Span,
fn_abi_request: FnAbiRequest<'tcx>,
) -> ! {
if let FnAbiError::Layout(LayoutError::SizeOverflow(_)) = err {
self.tcx.sess.span_fatal(span, &err.to_string())
} else {
match fn_abi_request {
FnAbiRequest::OfFnPtr { sig, extra_args } => {
span_bug!(
span,
"`fn_abi_of_fn_ptr({}, {:?})` failed: {}",
sig,
extra_args,
err
);
}
FnAbiRequest::OfInstance {
instance,
extra_args,
} => {
span_bug!(
span,
"`fn_abi_of_instance({}, {:?})` failed: {}",
instance,
extra_args,
err
);
}
}
} }
})
} }
} }

View File

@ -118,7 +118,6 @@ extern crate rustc_hir;
extern crate rustc_index; extern crate rustc_index;
extern crate rustc_interface; extern crate rustc_interface;
extern crate rustc_middle; extern crate rustc_middle;
extern crate rustc_mir;
extern crate rustc_session; extern crate rustc_session;
extern crate rustc_span; extern crate rustc_span;
extern crate rustc_target; extern crate rustc_target;
@ -171,9 +170,9 @@ use rustc_errors::{ErrorReported, FatalError, Handler};
use rustc_middle::dep_graph::{WorkProduct, WorkProductId}; use rustc_middle::dep_graph::{WorkProduct, WorkProductId};
use rustc_middle::middle::cstore::EncodedMetadata; use rustc_middle::middle::cstore::EncodedMetadata;
use rustc_middle::mir::mono::{Linkage, MonoItem, Visibility}; use rustc_middle::mir::mono::{Linkage, MonoItem, Visibility};
use rustc_middle::mir::pretty::write_mir_pretty;
use rustc_middle::ty::print::with_no_trimmed_paths; use rustc_middle::ty::print::with_no_trimmed_paths;
use rustc_middle::ty::{self, query, DefIdTree, Instance, InstanceDef, TyCtxt}; use rustc_middle::ty::{self, query, DefIdTree, Instance, InstanceDef, TyCtxt};
use rustc_mir::util::write_mir_pretty;
use rustc_session::config::{self, OptLevel, OutputFilenames, OutputType}; use rustc_session::config::{self, OptLevel, OutputFilenames, OutputType};
use rustc_session::Session; use rustc_session::Session;
use rustc_span::symbol::{sym, Symbol}; use rustc_span::symbol::{sym, Symbol};
@ -500,6 +499,7 @@ impl ExtraBackendMethods for SpirvCodegenBackend {
&self, &self,
_: TyCtxt<'tcx>, _: TyCtxt<'tcx>,
_: &mut Self::Module, _: &mut Self::Module,
_: &str,
_: AllocatorKind, _: AllocatorKind,
_: bool, _: bool,
) { ) {

View File

@ -11,7 +11,7 @@
), ),
register_attr(spirv) register_attr(spirv)
)] )]
#![feature(const_generics)] #![feature(adt_const_params)]
// BEGIN - Embark standard lints v0.4 // BEGIN - Embark standard lints v0.4
// do not change or add/remove here, but one can add exceptions after this section // do not change or add/remove here, but one can add exceptions after this section
// for more info see: <https://github.com/EmbarkStudios/rust-ecosystem/issues/59> // for more info see: <https://github.com/EmbarkStudios/rust-ecosystem/issues/59>
@ -88,7 +88,7 @@
// We deblierately provide an unimplemented version of our API on CPU // We deblierately provide an unimplemented version of our API on CPU
// platforms so that code completion still works. // platforms so that code completion still works.
clippy::unimplemented, clippy::unimplemented,
// The part of `const-generics` we're using (C-like enums) is not incomplete. // The part of `adt_const_params` we're using (C-like enums) is not incomplete.
incomplete_features, incomplete_features,
)] )]

View File

@ -5,5 +5,5 @@
# to the user in the error, instead of "error: invalid channel name '[toolchain]'". # to the user in the error, instead of "error: invalid channel name '[toolchain]'".
[toolchain] [toolchain]
channel = "nightly-2021-08-27" channel = "nightly-2021-09-29"
components = ["rust-src", "rustc-dev", "llvm-tools-preview"] components = ["rust-src", "rustc-dev", "llvm-tools-preview"]

View File

@ -1,6 +1,6 @@
// build-pass // build-pass
#![feature(const_generics)] #![feature(adt_const_params)]
#![allow(incomplete_features)] #![allow(incomplete_features)]
use spirv_std::memory::{Scope, Semantics}; use spirv_std::memory::{Scope, Semantics};

View File

@ -1,6 +1,6 @@
// build-pass // build-pass
#![feature(const_generics)] #![feature(adt_const_params)]
#![allow(incomplete_features)] #![allow(incomplete_features)]
use spirv_std::memory::{Scope, Semantics}; use spirv_std::memory::{Scope, Semantics};

View File

@ -6,7 +6,7 @@
// normalize-stderr-test "OpExtension .SPV_KHR_vulkan_memory_model.\n" -> "" // normalize-stderr-test "OpExtension .SPV_KHR_vulkan_memory_model.\n" -> ""
// normalize-stderr-test "OpMemoryModel Logical Vulkan" -> "OpMemoryModel Logical Simple" // normalize-stderr-test "OpMemoryModel Logical Vulkan" -> "OpMemoryModel Logical Simple"
#![feature(const_generics)] #![feature(adt_const_params)]
#![allow(incomplete_features)] #![allow(incomplete_features)]
use spirv_std::image::Dimensionality; use spirv_std::image::Dimensionality;

View File

@ -1,7 +1,7 @@
error: Cannot memcpy dynamically sized data error: Cannot memcpy dynamically sized data
--> $CORE_SRC/intrinsics.rs:2138:14 --> $CORE_SRC/intrinsics.rs:2137:14
| |
2138 | unsafe { copy(src, dst, count) } 2137 | unsafe { copy(src, dst, count) }
| ^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^
error: aborting due to previous error error: aborting due to previous error

View File

@ -5,9 +5,9 @@
%8 = OpVariable %5 Function %8 = OpVariable %5 Function
OpLine %9 319 5 OpLine %9 319 5
OpStore %8 %10 OpStore %8 %10
OpLine %11 703 8 OpLine %11 699 8
OpCopyMemory %8 %4 OpCopyMemory %8 %4
OpLine %11 704 8 OpLine %11 700 8
%12 = OpLoad %13 %8 %12 = OpLoad %13 %8
OpLine %14 7 13 OpLine %14 7 13
OpStore %6 %12 OpStore %6 %12

View File

@ -5,9 +5,9 @@
%8 = OpVariable %5 Function %8 = OpVariable %5 Function
OpLine %9 319 5 OpLine %9 319 5
OpStore %8 %10 OpStore %8 %10
OpLine %11 703 8 OpLine %11 699 8
OpCopyMemory %8 %4 OpCopyMemory %8 %4
OpLine %11 704 8 OpLine %11 700 8
%12 = OpLoad %13 %8 %12 = OpLoad %13 %8
OpLine %14 7 13 OpLine %14 7 13
OpStore %6 %12 OpStore %6 %12

View File

@ -7,7 +7,7 @@ OpLine %9 7 35
%10 = OpLoad %11 %4 %10 = OpLoad %11 %4
OpLine %9 7 13 OpLine %9 7 13
OpStore %8 %10 OpStore %8 %10
OpLine %12 894 8 OpLine %12 890 8
OpCopyMemory %6 %8 OpCopyMemory %6 %8
OpLine %9 8 1 OpLine %9 8 1
OpReturn OpReturn

View File

@ -7,7 +7,7 @@ OpLine %9 7 37
%10 = OpLoad %11 %4 %10 = OpLoad %11 %4
OpLine %12 1013 17 OpLine %12 1013 17
OpStore %8 %10 OpStore %8 %10
OpLine %13 894 8 OpLine %13 890 8
OpCopyMemory %6 %8 OpCopyMemory %6 %8
OpLine %9 8 1 OpLine %9 8 1
OpReturn OpReturn

View File

@ -15,7 +15,7 @@ OpBranchConditional %17 %22 %21
%22 = OpLabel %22 = OpLabel
OpLine %7 9 10 OpLine %7 9 10
%23 = OpSLessThan %18 %10 %24 %23 = OpSLessThan %18 %10 %24
OpLine %7 9 4 OpLine %7 9 10
OpSelectionMerge %25 None OpSelectionMerge %25 None
OpBranchConditional %23 %26 %27 OpBranchConditional %23 %26 %27
%26 = OpLabel %26 = OpLabel

View File

@ -17,10 +17,10 @@
// * builtin: `position` // * builtin: `position`
// NOTE(eddyb) accounting for the number of errors this test actually produces: // NOTE(eddyb) accounting for the number of errors this test actually produces:
// * 461 "attribute is only valid on" errors (see `invalid-target.stderr`) // * 473 errors, all "attribute is only valid on" (see `invalid-target.stderr`)
// * 40 `#[spirv(...)]` (excluding `macro_rules!`, which doesn't get the above error) // * 41 uses of `#[spirv(...)]` in this test
// * at most 12 attributes per `#[spirv(...)]`, so an upper bound of `40*12 = 480` // * at most 12 attributes per `#[spirv(...)]`, so an upper bound of `41*12 = 492`
// * the difference between 480 and 461 is 19, i.e. valid attributes, made up of: // * the difference between 492 and 473 is 19, i.e. valid attributes, made up of:
// * 4 on `_Struct` // * 4 on `_Struct`
// * 8 on functions, i.e. 2 on each of: // * 8 on functions, i.e. 2 on each of:
// * `_inherent_method` // * `_inherent_method`

View File

@ -1,217 +1,73 @@
error: attribute is only valid on a struct, not on a lifetime parameter error: attribute is only valid on a struct, not on a macro def
--> $DIR/invalid-target.rs:338:9 --> $DIR/invalid-target.rs:34:5
| |
338 | sampler, block, sampled_image, generic_image_type, // struct-only 34 | sampler, block, sampled_image, generic_image_type, // struct-only
| ^^^^^^^ | ^^^^^^^
error: attribute is only valid on a struct, not on a lifetime parameter error: attribute is only valid on a struct, not on a macro def
--> $DIR/invalid-target.rs:338:18 --> $DIR/invalid-target.rs:34:14
| |
338 | sampler, block, sampled_image, generic_image_type, // struct-only 34 | sampler, block, sampled_image, generic_image_type, // struct-only
| ^^^^^ | ^^^^^
error: attribute is only valid on a struct, not on a lifetime parameter error: attribute is only valid on a struct, not on a macro def
--> $DIR/invalid-target.rs:338:25 --> $DIR/invalid-target.rs:34:21
| |
338 | sampler, block, sampled_image, generic_image_type, // struct-only 34 | sampler, block, sampled_image, generic_image_type, // struct-only
| ^^^^^^^^^^^^^ | ^^^^^^^^^^^^^
error: attribute is only valid on a struct, not on a lifetime parameter error: attribute is only valid on a struct, not on a macro def
--> $DIR/invalid-target.rs:338:40 --> $DIR/invalid-target.rs:34:36
| |
338 | sampler, block, sampled_image, generic_image_type, // struct-only 34 | sampler, block, sampled_image, generic_image_type, // struct-only
| ^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^
error: attribute is only valid on a function, not on a lifetime parameter error: attribute is only valid on a function, not on a macro def
--> $DIR/invalid-target.rs:339:9 --> $DIR/invalid-target.rs:35:5
| |
339 | vertex, // fn-only 35 | vertex, // fn-only
| ^^^^^^ | ^^^^^^
error: attribute is only valid on a function parameter, not on a lifetime parameter error: attribute is only valid on a function parameter, not on a macro def
--> $DIR/invalid-target.rs:340:9 --> $DIR/invalid-target.rs:36:5
| |
340 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only 36 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only
| ^^^^^^^ | ^^^^^^^
error: attribute is only valid on a function parameter, not on a lifetime parameter error: attribute is only valid on a function parameter, not on a macro def
--> $DIR/invalid-target.rs:340:18 --> $DIR/invalid-target.rs:36:14
| |
340 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only 36 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only
| ^^^^^^^^ | ^^^^^^^^
error: attribute is only valid on a function parameter, not on a lifetime parameter error: attribute is only valid on a function parameter, not on a macro def
--> $DIR/invalid-target.rs:340:28 --> $DIR/invalid-target.rs:36:24
| |
340 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only 36 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only
| ^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^
error: attribute is only valid on a function parameter, not on a lifetime parameter error: attribute is only valid on a function parameter, not on a macro def
--> $DIR/invalid-target.rs:340:48 --> $DIR/invalid-target.rs:36:44
| |
340 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only 36 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only
| ^^^^^^^^^^^ | ^^^^^^^^^^^
error: attribute is only valid on a function parameter, not on a lifetime parameter error: attribute is only valid on a function parameter, not on a macro def
--> $DIR/invalid-target.rs:340:61 --> $DIR/invalid-target.rs:36:57
| |
340 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only 36 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only
| ^^^^ | ^^^^
error: attribute is only valid on a function parameter, not on a lifetime parameter error: attribute is only valid on a function parameter, not on a macro def
--> $DIR/invalid-target.rs:340:67 --> $DIR/invalid-target.rs:36:63
| |
340 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only 36 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only
| ^^^^^^^^^ | ^^^^^^^^^
error: attribute is only valid on a function or closure, not on a lifetime parameter error: attribute is only valid on a function or closure, not on a macro def
--> $DIR/invalid-target.rs:341:9 --> $DIR/invalid-target.rs:37:5
| |
341 | unroll_loops, // fn/closure-only 37 | unroll_loops, // fn/closure-only
| ^^^^^^^^^^^^
error: attribute is only valid on a struct, not on a type parameter
--> $DIR/invalid-target.rs:344:9
|
344 | sampler, block, sampled_image, generic_image_type, // struct-only
| ^^^^^^^
error: attribute is only valid on a struct, not on a type parameter
--> $DIR/invalid-target.rs:344:18
|
344 | sampler, block, sampled_image, generic_image_type, // struct-only
| ^^^^^
error: attribute is only valid on a struct, not on a type parameter
--> $DIR/invalid-target.rs:344:25
|
344 | sampler, block, sampled_image, generic_image_type, // struct-only
| ^^^^^^^^^^^^^
error: attribute is only valid on a struct, not on a type parameter
--> $DIR/invalid-target.rs:344:40
|
344 | sampler, block, sampled_image, generic_image_type, // struct-only
| ^^^^^^^^^^^^^^^^^^
error: attribute is only valid on a function, not on a type parameter
--> $DIR/invalid-target.rs:345:9
|
345 | vertex, // fn-only
| ^^^^^^
error: attribute is only valid on a function parameter, not on a type parameter
--> $DIR/invalid-target.rs:346:9
|
346 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only
| ^^^^^^^
error: attribute is only valid on a function parameter, not on a type parameter
--> $DIR/invalid-target.rs:346:18
|
346 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only
| ^^^^^^^^
error: attribute is only valid on a function parameter, not on a type parameter
--> $DIR/invalid-target.rs:346:28
|
346 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only
| ^^^^^^^^^^^^^^^^^^
error: attribute is only valid on a function parameter, not on a type parameter
--> $DIR/invalid-target.rs:346:48
|
346 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only
| ^^^^^^^^^^^
error: attribute is only valid on a function parameter, not on a type parameter
--> $DIR/invalid-target.rs:346:61
|
346 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only
| ^^^^
error: attribute is only valid on a function parameter, not on a type parameter
--> $DIR/invalid-target.rs:346:67
|
346 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only
| ^^^^^^^^^
error: attribute is only valid on a function or closure, not on a type parameter
--> $DIR/invalid-target.rs:347:9
|
347 | unroll_loops, // fn/closure-only
| ^^^^^^^^^^^^
error: attribute is only valid on a struct, not on a const parameter
--> $DIR/invalid-target.rs:350:9
|
350 | sampler, block, sampled_image, generic_image_type, // struct-only
| ^^^^^^^
error: attribute is only valid on a struct, not on a const parameter
--> $DIR/invalid-target.rs:350:18
|
350 | sampler, block, sampled_image, generic_image_type, // struct-only
| ^^^^^
error: attribute is only valid on a struct, not on a const parameter
--> $DIR/invalid-target.rs:350:25
|
350 | sampler, block, sampled_image, generic_image_type, // struct-only
| ^^^^^^^^^^^^^
error: attribute is only valid on a struct, not on a const parameter
--> $DIR/invalid-target.rs:350:40
|
350 | sampler, block, sampled_image, generic_image_type, // struct-only
| ^^^^^^^^^^^^^^^^^^
error: attribute is only valid on a function, not on a const parameter
--> $DIR/invalid-target.rs:351:9
|
351 | vertex, // fn-only
| ^^^^^^
error: attribute is only valid on a function parameter, not on a const parameter
--> $DIR/invalid-target.rs:352:9
|
352 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only
| ^^^^^^^
error: attribute is only valid on a function parameter, not on a const parameter
--> $DIR/invalid-target.rs:352:18
|
352 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only
| ^^^^^^^^
error: attribute is only valid on a function parameter, not on a const parameter
--> $DIR/invalid-target.rs:352:28
|
352 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only
| ^^^^^^^^^^^^^^^^^^
error: attribute is only valid on a function parameter, not on a const parameter
--> $DIR/invalid-target.rs:352:48
|
352 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only
| ^^^^^^^^^^^
error: attribute is only valid on a function parameter, not on a const parameter
--> $DIR/invalid-target.rs:352:61
|
352 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only
| ^^^^
error: attribute is only valid on a function parameter, not on a const parameter
--> $DIR/invalid-target.rs:352:67
|
352 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only
| ^^^^^^^^^
error: attribute is only valid on a function or closure, not on a const parameter
--> $DIR/invalid-target.rs:353:9
|
353 | unroll_loops, // fn/closure-only
| ^^^^^^^^^^^^ | ^^^^^^^^^^^^
error: attribute is only valid on a struct, not on a extern crate error: attribute is only valid on a struct, not on a extern crate
@ -1936,6 +1792,222 @@ error: attribute is only valid on a function or closure, not on a match arm
330 | unroll_loops, // fn/closure-only 330 | unroll_loops, // fn/closure-only
| ^^^^^^^^^^^^ | ^^^^^^^^^^^^
error: attribute is only valid on a struct, not on a lifetime parameter
--> $DIR/invalid-target.rs:338:9
|
338 | sampler, block, sampled_image, generic_image_type, // struct-only
| ^^^^^^^
error: attribute is only valid on a struct, not on a lifetime parameter
--> $DIR/invalid-target.rs:338:18
|
338 | sampler, block, sampled_image, generic_image_type, // struct-only
| ^^^^^
error: attribute is only valid on a struct, not on a lifetime parameter
--> $DIR/invalid-target.rs:338:25
|
338 | sampler, block, sampled_image, generic_image_type, // struct-only
| ^^^^^^^^^^^^^
error: attribute is only valid on a struct, not on a lifetime parameter
--> $DIR/invalid-target.rs:338:40
|
338 | sampler, block, sampled_image, generic_image_type, // struct-only
| ^^^^^^^^^^^^^^^^^^
error: attribute is only valid on a function, not on a lifetime parameter
--> $DIR/invalid-target.rs:339:9
|
339 | vertex, // fn-only
| ^^^^^^
error: attribute is only valid on a function parameter, not on a lifetime parameter
--> $DIR/invalid-target.rs:340:9
|
340 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only
| ^^^^^^^
error: attribute is only valid on a function parameter, not on a lifetime parameter
--> $DIR/invalid-target.rs:340:18
|
340 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only
| ^^^^^^^^
error: attribute is only valid on a function parameter, not on a lifetime parameter
--> $DIR/invalid-target.rs:340:28
|
340 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only
| ^^^^^^^^^^^^^^^^^^
error: attribute is only valid on a function parameter, not on a lifetime parameter
--> $DIR/invalid-target.rs:340:48
|
340 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only
| ^^^^^^^^^^^
error: attribute is only valid on a function parameter, not on a lifetime parameter
--> $DIR/invalid-target.rs:340:61
|
340 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only
| ^^^^
error: attribute is only valid on a function parameter, not on a lifetime parameter
--> $DIR/invalid-target.rs:340:67
|
340 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only
| ^^^^^^^^^
error: attribute is only valid on a function or closure, not on a lifetime parameter
--> $DIR/invalid-target.rs:341:9
|
341 | unroll_loops, // fn/closure-only
| ^^^^^^^^^^^^
error: attribute is only valid on a struct, not on a type parameter
--> $DIR/invalid-target.rs:344:9
|
344 | sampler, block, sampled_image, generic_image_type, // struct-only
| ^^^^^^^
error: attribute is only valid on a struct, not on a type parameter
--> $DIR/invalid-target.rs:344:18
|
344 | sampler, block, sampled_image, generic_image_type, // struct-only
| ^^^^^
error: attribute is only valid on a struct, not on a type parameter
--> $DIR/invalid-target.rs:344:25
|
344 | sampler, block, sampled_image, generic_image_type, // struct-only
| ^^^^^^^^^^^^^
error: attribute is only valid on a struct, not on a type parameter
--> $DIR/invalid-target.rs:344:40
|
344 | sampler, block, sampled_image, generic_image_type, // struct-only
| ^^^^^^^^^^^^^^^^^^
error: attribute is only valid on a function, not on a type parameter
--> $DIR/invalid-target.rs:345:9
|
345 | vertex, // fn-only
| ^^^^^^
error: attribute is only valid on a function parameter, not on a type parameter
--> $DIR/invalid-target.rs:346:9
|
346 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only
| ^^^^^^^
error: attribute is only valid on a function parameter, not on a type parameter
--> $DIR/invalid-target.rs:346:18
|
346 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only
| ^^^^^^^^
error: attribute is only valid on a function parameter, not on a type parameter
--> $DIR/invalid-target.rs:346:28
|
346 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only
| ^^^^^^^^^^^^^^^^^^
error: attribute is only valid on a function parameter, not on a type parameter
--> $DIR/invalid-target.rs:346:48
|
346 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only
| ^^^^^^^^^^^
error: attribute is only valid on a function parameter, not on a type parameter
--> $DIR/invalid-target.rs:346:61
|
346 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only
| ^^^^
error: attribute is only valid on a function parameter, not on a type parameter
--> $DIR/invalid-target.rs:346:67
|
346 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only
| ^^^^^^^^^
error: attribute is only valid on a function or closure, not on a type parameter
--> $DIR/invalid-target.rs:347:9
|
347 | unroll_loops, // fn/closure-only
| ^^^^^^^^^^^^
error: attribute is only valid on a struct, not on a const parameter
--> $DIR/invalid-target.rs:350:9
|
350 | sampler, block, sampled_image, generic_image_type, // struct-only
| ^^^^^^^
error: attribute is only valid on a struct, not on a const parameter
--> $DIR/invalid-target.rs:350:18
|
350 | sampler, block, sampled_image, generic_image_type, // struct-only
| ^^^^^
error: attribute is only valid on a struct, not on a const parameter
--> $DIR/invalid-target.rs:350:25
|
350 | sampler, block, sampled_image, generic_image_type, // struct-only
| ^^^^^^^^^^^^^
error: attribute is only valid on a struct, not on a const parameter
--> $DIR/invalid-target.rs:350:40
|
350 | sampler, block, sampled_image, generic_image_type, // struct-only
| ^^^^^^^^^^^^^^^^^^
error: attribute is only valid on a function, not on a const parameter
--> $DIR/invalid-target.rs:351:9
|
351 | vertex, // fn-only
| ^^^^^^
error: attribute is only valid on a function parameter, not on a const parameter
--> $DIR/invalid-target.rs:352:9
|
352 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only
| ^^^^^^^
error: attribute is only valid on a function parameter, not on a const parameter
--> $DIR/invalid-target.rs:352:18
|
352 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only
| ^^^^^^^^
error: attribute is only valid on a function parameter, not on a const parameter
--> $DIR/invalid-target.rs:352:28
|
352 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only
| ^^^^^^^^^^^^^^^^^^
error: attribute is only valid on a function parameter, not on a const parameter
--> $DIR/invalid-target.rs:352:48
|
352 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only
| ^^^^^^^^^^^
error: attribute is only valid on a function parameter, not on a const parameter
--> $DIR/invalid-target.rs:352:61
|
352 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only
| ^^^^
error: attribute is only valid on a function parameter, not on a const parameter
--> $DIR/invalid-target.rs:352:67
|
352 | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only
| ^^^^^^^^^
error: attribute is only valid on a function or closure, not on a const parameter
--> $DIR/invalid-target.rs:353:9
|
353 | unroll_loops, // fn/closure-only
| ^^^^^^^^^^^^
error: attribute is only valid on a struct, not on a associated type error: attribute is only valid on a struct, not on a associated type
--> $DIR/invalid-target.rs:228:9 --> $DIR/invalid-target.rs:228:9
| |
@ -2764,16 +2836,5 @@ error: attribute is only valid on a function or closure, not on a foreign functi
94 | unroll_loops, // fn/closure-only 94 | unroll_loops, // fn/closure-only
| ^^^^^^^^^^^^ | ^^^^^^^^^^^^
error: #[spirv(..)] cannot be applied to a macro error: aborting due to 473 previous errors
--> $DIR/invalid-target.rs:33:1
|
33 | / #[spirv(
34 | | sampler, block, sampled_image, generic_image_type, // struct-only
35 | | vertex, // fn-only
36 | | uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only
37 | | unroll_loops, // fn/closure-only
38 | | )]
| |__^
error: aborting due to 462 previous errors